Skip to content

Commit

Permalink
Guardian or protector pet can have threat list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberium committed Sep 2, 2016
1 parent c7f07d8 commit c7f56c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game/Unit.cpp
Expand Up @@ -8844,7 +8844,12 @@ bool Unit::CanHaveThreatList(bool ignoreAliveState/*=false*/) const

// pets can not have a threat list, unless they are controlled by a creature
if (creature->IsPet() && creature->GetOwnerGuid().IsPlayer())
{
Pet const* pet = static_cast<Pet const*>(creature);
if (pet->getPetType() == GUARDIAN_PET || pet->getPetType() == PROTECTOR_PET)
return true;
return false;
}

// charmed units can not have a threat list if charmed by player
if (creature->GetCharmerGuid().IsPlayer())
Expand Down

0 comments on commit c7f56c1

Please sign in to comment.