mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
*Add some distance check functions. By VladimirMangos.
--HG-- branch : trunk
This commit is contained in:
@@ -126,7 +126,7 @@ void GuardAI::UpdateAI(const uint32 /*diff*/)
|
||||
|
||||
bool GuardAI::IsVisible(Unit *pl) const
|
||||
{
|
||||
return m_creature->GetDistance(pl) < sWorld.getConfig(CONFIG_SIGHT_GUARDER)
|
||||
return m_creature->IsWithinDist(pl,sWorld.getConfig(CONFIG_SIGHT_GUARDER))
|
||||
&& pl->isVisibleForOrDetect(m_creature,true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user