mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-26 08:29:21 -04:00
Core/Entities: moved PetAura handling to Player where it belongs
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user