diff options
author | treeston <treeston.mmoc@gmail.com> | 2016-01-13 18:38:54 +0100 |
---|---|---|
committer | treeston <treeston.mmoc@gmail.com> | 2016-01-13 18:38:54 +0100 |
commit | 233297c5c8619af96e2aab4fa5ef6d205b5dc18a (patch) | |
tree | a1a6f2275592e7639b17b71842cd7aaf90e1455d /src/server/game/AI/CreatureAI.cpp | |
parent | 5b8b8c653039ec2add0b3a66468abb85e6f35054 (diff) | |
parent | f481ae1048aac32ba3a40491f0304d0317234295 (diff) |
Merge branch '3.3.5-spellfacing' into 3.3.5-base (PR #15641)
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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; } |