mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 08:28:57 +01:00
*Fix a crash bug in the previous rev.
--HG-- branch : trunk
This commit is contained in:
@@ -718,9 +718,10 @@ bool GameObject::isVisibleForInState(Player const* u, bool inVisibleList) const
|
||||
return false;
|
||||
|
||||
// special invisibility cases
|
||||
if(GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP && GetGOInfo()->trap.stealthed && u->IsHostileTo(GetOwner()))
|
||||
if(GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP && GetGOInfo()->trap.stealthed)
|
||||
{
|
||||
if(!canDetectTrap(u, GetDistance(u)))
|
||||
Unit *owner = GetOwner();
|
||||
if(owner && u->IsHostileTo(owner) && !canDetectTrap(u, GetDistance(u)))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user