aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.cpp
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2017-04-27 14:00:57 +0200
committerccrs <ccrs@users.noreply.github.com>2017-04-27 14:00:57 +0200
commit5fc366d03bf4e5250443e0573a4c9fa4611968a4 (patch)
tree511678279659de79360a665cc96080ef138387f5 /src/server/game/AI/CreatureAI.cpp
parent5043639c563514c079ba6eb959dd4c1c555fa494 (diff)
Core/CreatureAI: b6b0353bff followup
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r--src/server/game/AI/CreatureAI.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 06c8f60a1fb..ca9fb578be5 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -206,7 +206,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);
}
@@ -226,7 +226,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;