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

This commit is contained in:
Aokromes committed 2017-05-02 02:10:32 +02:00
1 parent f3246f835c
commit acd63b4259
8 files changed
+33 -36

No files matched your search

-20
View File
@@ -13723,26 +13723,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)