Core/AI: prevent triggering Alert (stealth pre-detection system) for Player immuned units
(cherry picked from commit eccb8857f1cbb480f3acef6fd16c99d607399974)
This commit is contained in:
@@ -148,8 +148,8 @@ void CreatureAI::TriggerAlert(Unit const* who) const
|
||||
if (me->GetTypeId() != TYPEID_UNIT || me->IsEngaged() || me->HasUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_STUNNED | UNIT_STATE_FLEEING | UNIT_STATE_DISTRACTED))
|
||||
return;
|
||||
|
||||
// Only alert for hostiles!
|
||||
if (me->IsCivilian() || me->HasReactState(REACT_PASSIVE) || !me->IsHostileTo(who) || !me->_IsTargetAcceptable(who))
|
||||
// Only alert for hostiles that can actually engage the target.
|
||||
if (me->IsCivilian() || me->HasReactState(REACT_PASSIVE) || me->IsImmuneToPC() || !me->IsHostileTo(who) || !me->_IsTargetAcceptable(who))
|
||||
return;
|
||||
|
||||
// Send alert sound (if any) for this creature
|
||||
|
||||
Reference in New Issue
Block a user