fix(Core/AI): Fixed mobs attacking in defensive state. (#14947)
This commit is contained in:
parent
07b458afda
commit
f496535cc8
3 changed files with 3 additions and 3 deletions
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ void SmartAI::MoveInLineOfSight(Unit* who)
|
|||
if (me->HasReactState(REACT_PASSIVE) || AssistPlayerInCombatAgainst(who))
|
||||
return;
|
||||
|
||||
if (me->CanStartAttack(who))
|
||||
if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who))
|
||||
{
|
||||
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue