*Fix broken pet-related spells.
--HG-- branch : trunk
This commit is contained in:
+2
-2
@@ -8258,11 +8258,11 @@ Guardian* Unit::GetGuardianPet() const
|
|||||||
{
|
{
|
||||||
if(uint64 pet_guid = GetPetGUID())
|
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))
|
if(pet->HasSummonMask(SUMMON_MASK_GUARDIAN))
|
||||||
return (Guardian*)pet;
|
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);
|
const_cast<Unit*>(this)->SetPetGUID(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user