mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
fix(Core/CreatureAI): enemy stealth alert ignoring LOS (#9161)
This commit is contained in:
@@ -186,6 +186,9 @@ void CreatureAI::TriggerAlert(Unit const* who) const
|
||||
// Only alert for hostiles!
|
||||
if (me->IsCivilian() || me->HasReactState(REACT_PASSIVE) || !me->IsHostileTo(who) || !me->_IsTargetAcceptable(who))
|
||||
return;
|
||||
// Only alert if target is within line of sight
|
||||
if (!me->IsWithinLOSInMap(who))
|
||||
return;
|
||||
// Send alert sound (if any) for this creature
|
||||
me->SendAIReaction(AI_REACTION_ALERT);
|
||||
// Face the unit (stealthed player) and set distracted state for 5 seconds
|
||||
|
||||
Reference in New Issue
Block a user