From 009cabb4b9d60a02ed2f219127c0df293ea96580 Mon Sep 17 00:00:00 2001 From: treeston Date: Wed, 13 Jan 2016 18:38:54 +0100 Subject: Merge branch '3.3.5-spellfacing' into 3.3.5-base (PR #15641) (cherry picked from commit 233297c5c8619af96e2aab4fa5ef6d205b5dc18a) --- src/server/game/AI/CreatureAI.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/server/game/AI') diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 8ef8940e89f..c254a9124c1 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -204,7 +204,8 @@ void CreatureAI::SetGazeOn(Unit* target) { if (me->IsValidAttackTarget(target)) { - AttackStart(target); + if (!me->IsFocusing(nullptr, true)) + AttackStart(target); me->SetReactState(REACT_PASSIVE); } } @@ -223,7 +224,8 @@ bool CreatureAI::UpdateVictimWithGaze() } if (Unit* victim = me->SelectVictim()) - AttackStart(victim); + if (!me->IsFocusing(nullptr, true)) + AttackStart(victim); return me->GetVictim() != nullptr; } @@ -236,7 +238,8 @@ bool CreatureAI::UpdateVictim() if (!me->HasReactState(REACT_PASSIVE)) { if (Unit* victim = me->SelectVictim()) - AttackStart(victim); + if (!me->IsFocusing(nullptr, true)) + AttackStart(victim); return me->GetVictim() != nullptr; } -- cgit v1.2.3