--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-20 06:00:39 +01:00
4 changed files with 39 additions and 28 deletions
@@ -737,7 +737,7 @@ struct TRINITY_DLL_DECL mob_palehoof_orbAI : public ScriptedAI
{ {
if (type != POINT_MOTION_TYPE) if (type != POINT_MOTION_TYPE)
return; return;
if(id<0&&id>4) if(id<0 || id>4)
return; return;
Creature *pNext; Creature *pNext;
switch(id) switch(id)
@@ -40,39 +40,37 @@ struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI
void Reset() void Reset()
{ {
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
float x, y, z;
Rageclaw = NULL; Rageclaw = NULL;
m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize()/3,0.1); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW,x,y,z,0,TEMPSUMMON_DEAD_DESPAWN,1000))
DoActionOnRageclaw(true,summon); float x, y, z;
m_creature->GetClosePoint(x, y, z, m_creature->GetObjectSize() / 3, 0.1f);
if (Unit* summon = m_creature->SummonCreature(NPC_RAGECLAW, x, y, z,
0, TEMPSUMMON_DEAD_DESPAWN, 1000))
{
Rageclaw = summon;
LockRageclaw();
}
} }
void DoActionOnRageclaw(bool bLocking, Unit* pWho) void LockRageclaw()
{
m_creature->SetInFront(Rageclaw);
Rageclaw->SetInFront(m_creature);
DoCast(Rageclaw, SPELL_LEFT_CHAIN, true);
DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true);
}
void UnlockRageclaw(Unit* pWho)
{ {
if (!pWho) if (!pWho)
return; return;
Rageclaw = pWho; DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true);
if (bLocking) m_creature->setDeathState(DEAD);
{
if (pWho)
{
m_creature->SetInFront(Rageclaw);
Rageclaw->SetInFront(m_creature);
DoCast(Rageclaw, SPELL_LEFT_CHAIN, true);
DoCast(Rageclaw, SPELL_RIGHT_CHAIN, true);
}
}
else
{
DoCast(Rageclaw, SPELL_FREE_RAGECLAW, true);
if (pWho->GetTypeId() == TYPEID_PLAYER)
CAST_PLR(pWho)->CastSpell(Rageclaw, SPELL_UNLOCK_SHACKLE, true);
m_creature->setDeathState(DEAD);
}
} }
void SpellHit(Unit* pCaster, const SpellEntry* pSpell) void SpellHit(Unit* pCaster, const SpellEntry* pSpell)
@@ -80,13 +78,14 @@ struct TRINITY_DLL_DECL npc_drakuru_shacklesAI : public ScriptedAI
if (pSpell->Id == SPELL_UNLOCK_SHACKLE) if (pSpell->Id == SPELL_UNLOCK_SHACKLE)
{ {
if (Rageclaw) if (Rageclaw)
DoActionOnRageclaw(false, pCaster); UnlockRageclaw(pCaster);
else else
m_creature->setDeathState(JUST_DIED); m_creature->setDeathState(JUST_DIED);
} }
} }
}; };
CreatureAI* GetAI_npc_drakuru_shackles(Creature* pCreature) CreatureAI* GetAI_npc_drakuru_shackles(Creature* pCreature)
{ {
return new npc_drakuru_shacklesAI (pCreature); return new npc_drakuru_shacklesAI (pCreature);
+8 -1
View File
@@ -437,7 +437,14 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100); damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100);
// Shield Slam // Shield Slam
else if(m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209) else if(m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209)
{
damage += int32(m_caster->GetShieldBlockValue()); damage += int32(m_caster->GetShieldBlockValue());
// Glyph of Shield Slam
if (m_caster->HasAura(58375))
m_caster->CastSpell(m_caster, 58374, true);
}
// Victory Rush // Victory Rush
else if(m_spellInfo->SpellFamilyFlags[1] & 0x100) else if(m_spellInfo->SpellFamilyFlags[1] & 0x100)
{ {
@@ -611,7 +618,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
for (uint32 i = 0; i < doses; ++i) for (uint32 i = 0; i < doses; ++i)
unitTarget->RemoveAuraFromStack(spellId); unitTarget->RemoveAuraFromStack(spellId);
damage *= doses; damage *= doses;
damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.03f * doses); damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.09f * doses);
} }
// Eviscerate and Envenom Bonus Damage (item set effect) // Eviscerate and Envenom Bonus Damage (item set effect)
if (m_caster->HasAura(37169)) if (m_caster->HasAura(37169))
+5
View File
@@ -10278,6 +10278,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
TakenTotalMod *= (HealingWay->GetAmount() + 100.0f) / 100.0f; TakenTotalMod *= (HealingWay->GetAmount() + 100.0f) / 100.0f;
} }
// Tenacity increase healing % taken
if (AuraEffect const* Tenacity = pVictim->GetAuraEffect(58549, 0))
TakenTotalMod *= (Tenacity->GetAmount() + 100.0f) / 100.0f;
// Healing taken percent // Healing taken percent
float minval = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT); float minval = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT);
if (minval) if (minval)