Core/Entities: moved PetAura handling to Player where it belongs

This commit is contained in:
ariel-
2017-04-28 18:11:23 -03:00
parent b6b59f6c23
commit 231ec8331b
8 changed files with 33 additions and 36 deletions

View File

@@ -719,10 +719,13 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
}
// pet auras
if (PetAura const* petSpell = sSpellMgr->GetPetAura(m_spellInfo->Id, effIndex))
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
m_caster->AddPetAura(petSpell);
return;
if (PetAura const* petSpell = sSpellMgr->GetPetAura(m_spellInfo->Id, effIndex))
{
m_caster->ToPlayer()->AddPetAura(petSpell);
return;
}
}
// normal DB scripted effect