Core/Misc: Added new CanSeeOrDetectExtraArgs to CanSeeOrDetect
Port From (https://github.com/TrinityCore/TrinityCore/commit/260fab23786917619ad3453677ed7d983a431cc4)
This commit is contained in:
@@ -32,11 +32,11 @@ namespace Game.Maps
|
||||
|
||||
if (!c.HasUnitState(UnitState.Sightless))
|
||||
{
|
||||
if (c.IsAIEnabled() && c.CanSeeOrDetect(u, false, true))
|
||||
if (c.IsAIEnabled() && c.CanSeeOrDetect(u, new CanSeeOrDetectExtraArgs() { DistanceCheck = true }))
|
||||
c.GetAI().MoveInLineOfSight_Safe(u);
|
||||
else
|
||||
{
|
||||
if (u.IsTypeId(TypeId.Player) && u.HasStealthAura() && c.IsAIEnabled() && c.CanSeeOrDetect(u, false, true, true))
|
||||
if (u.IsTypeId(TypeId.Player) && u.HasStealthAura() && c.IsAIEnabled() && c.CanSeeOrDetect(u, new CanSeeOrDetectExtraArgs() { DistanceCheck = true, AlertCheck = true }))
|
||||
c.GetAI().TriggerAlert(u);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user