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
-20
View File
@@ -11823,26 +11823,6 @@ void Unit::SetContestedPvP(Player* attackedPlayer)
}
}
void Unit::AddPetAura(PetAura const* petSpell)
{
if (GetTypeId() != TYPEID_PLAYER)
return;
m_petAuras.insert(petSpell);
if (Pet* pet = ToPlayer()->GetPet())
pet->CastPetAura(petSpell);
}
void Unit::RemovePetAura(PetAura const* petSpell)
{
if (GetTypeId() != TYPEID_PLAYER)
return;
m_petAuras.erase(petSpell);
if (Pet* pet = ToPlayer()->GetPet())
pet->RemoveAurasDueToSpell(petSpell->GetAura(pet->GetEntry()));
}
Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget, uint32 spell_id)
{
if (GetTypeId() != TYPEID_PLAYER)