Core/AI: Fix creatures not updating their target properly once engaged

Closes  #21562

(cherry picked from commit 7fb74326205acbc5c0fa6b2aa9731d891e788d64)
This commit is contained in:
Killyana
2021-12-19 15:54:20 +01:00
committed by Shauren
parent 8d32849b34
commit d946d74ff9
+3 -1
View File
@@ -285,6 +285,8 @@ void SmartAI::UpdateAI(uint32 diff)
CheckConditions(diff);
bool hasVictim = UpdateVictim();
GetScript()->OnUpdate(diff);
UpdatePath(diff);
@@ -294,7 +296,7 @@ void SmartAI::UpdateAI(uint32 diff)
if (!IsAIControlled())
return;
if (!UpdateVictim())
if (!hasVictim)
return;
if (_canAutoAttack)