fix(Core/AI): Fixed mobs attacking in defensive state. (#14947)

This commit is contained in:
UltraNix
2023-02-11 16:06:17 +01:00
committed by GitHub
parent 07b458afda
commit f496535cc8
3 changed files with 3 additions and 3 deletions

View File

@@ -141,7 +141,7 @@ void npc_escortAI::MoveInLineOfSight(Unit* who)
if (HasEscortState(STATE_ESCORT_ESCORTING) && AssistPlayerInCombatAgainst(who))
return;
if (me->CanStartAttack(who))
if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who))
{
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
{

View File

@@ -99,7 +99,7 @@ void FollowerAI::MoveInLineOfSight(Unit* who)
if (HasFollowState(STATE_FOLLOW_INPROGRESS) && AssistPlayerInCombatAgainst(who))
return;
if (me->CanStartAttack(who))
if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who))
{
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
{