mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
*Fix broken pet-related spells.
--HG-- branch : trunk
This commit is contained in:
@@ -8258,11 +8258,11 @@ Guardian* Unit::GetGuardianPet() const
|
||||
{
|
||||
if(uint64 pet_guid = GetPetGUID())
|
||||
{
|
||||
if(Creature* pet = ObjectAccessor::GetCreature(*this, pet_guid))
|
||||
if(Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, pet_guid))
|
||||
if(pet->HasSummonMask(SUMMON_MASK_GUARDIAN))
|
||||
return (Guardian*)pet;
|
||||
|
||||
sLog.outError("Player::GetPet: Pet %u not exist.",GUID_LOPART(pet_guid));
|
||||
sLog.outError("Unit::GetGuardianPet: Pet %u not exist.",GUID_LOPART(pet_guid));
|
||||
const_cast<Unit*>(this)->SetPetGUID(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user