Core/Misc: Added new CanSeeOrDetectExtraArgs to CanSeeOrDetect

Port From (https://github.com/TrinityCore/TrinityCore/commit/260fab23786917619ad3453677ed7d983a431cc4)
This commit is contained in:
Hondacrx
2025-08-14 20:37:45 -04:00
parent 1b838e6d5a
commit 1f80df2465
6 changed files with 70 additions and 29 deletions
+2 -2
View File
@@ -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);
}
}