diff options
author | ccrs <ccrs@users.noreply.github.com> | 2017-04-27 14:00:57 +0200 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2020-04-28 14:55:44 +0200 |
commit | 5d411e0b21b1f1a4653d274d9b1cc7fef17f232b (patch) | |
tree | 0d33ef13a632485dd12439b2be92d9ae4a1c6876 /src/server/game/AI/CreatureAI.cpp | |
parent | 9a57e95f102a9d35ac8416d02e24c0dddbc755ed (diff) |
Core/CreatureAI: b6b0353bff followup
(cherry picked from commit 5fc366d03bf4e5250443e0573a4c9fa4611968a4)
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 835f5369c9f..7d1aaca570e 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -217,7 +217,7 @@ void CreatureAI::SetGazeOn(Unit* target) { if (me->IsValidAttackTarget(target)) { - if (!me->IsFocusing(nullptr, true)) + if (!me->IsFocusing(nullptr, true) && target != me->GetVictim()) AttackStart(target); me->SetReactState(REACT_PASSIVE); } @@ -237,7 +237,7 @@ bool CreatureAI::UpdateVictimWithGaze() } if (Unit* victim = me->SelectVictim()) - if (!me->IsFocusing(nullptr, true)) + if (!me->IsFocusing(nullptr, true) && victim != me->GetVictim()) AttackStart(victim); return me->GetVictim() != nullptr; |