mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[6928] Corrected the handling of evade and threat for creature summoned pets. Should fix some of the setVisibility crashes.
This commit is contained in:
parent
1884889f04
commit
ed4efc317c
3 changed files with 21 additions and 4 deletions
|
|
@ -9094,8 +9094,16 @@ bool Unit::CanHaveThreatList() const
|
|||
if( !isAlive() )
|
||||
return false;
|
||||
|
||||
// pets and totems can not have threat list
|
||||
if( ((Creature*)this)->isPet() || ((Creature*)this)->isTotem() || ((Creature*)this)->isVehicle() )
|
||||
// totems can not have threat list
|
||||
if( ((Creature*)this)->isTotem() )
|
||||
return false;
|
||||
|
||||
// vehicles can not have threat list
|
||||
if( ((Creature*)this)->isVehicle() )
|
||||
return false;
|
||||
|
||||
// pets can not have a threat list, unless they are controlled by a creature
|
||||
if( ((Creature*)this)->isPet() && IS_PLAYER_GUID(((Pet*)this)->GetOwnerGUID()) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue