Core/Spells: Fixed Heart of the Phoenix pet spell

Closes issue #3911.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-11-11 22:53:52 +01:00
parent 0f9279b7ef
commit 090acddee3
2 changed files with 10 additions and 3 deletions

View File

@@ -419,9 +419,10 @@ public:
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
if (caster->HasAura(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
Unit *owner = caster->GetOwner();
if (!owner || caster->HasAura(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
return;
caster->CastCustomSpell(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED, SPELLVALUE_BASE_POINT0, 100, caster, true);
owner->CastCustomSpell(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED, SPELLVALUE_BASE_POINT0, 100, caster, true);
caster->CastSpell(caster, HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF, true);
}