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

Closes  #21562

(cherry picked from commit 7fb7432620)
This commit is contained in:
Killyana
2019-12-30 19:03:14 +01:00
committed by Shauren
parent 8d32849b34
commit d946d74ff9

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)