Core/AI: Fix creatures not updating their target properly once engaged
Port From (https://github.com/TrinityCore/TrinityCore/commit/d946d74ff9f2d4bec8b78a6b7ea85fbb9daefeb5)
This commit is contained in:
@@ -331,6 +331,8 @@ namespace Game.AI
|
||||
|
||||
CheckConditions(diff);
|
||||
|
||||
bool hasVictim = UpdateVictim();
|
||||
|
||||
GetScript().OnUpdate(diff);
|
||||
|
||||
UpdatePath(diff);
|
||||
@@ -340,7 +342,7 @@ namespace Game.AI
|
||||
if (!IsAIControlled())
|
||||
return;
|
||||
|
||||
if (!UpdateVictim())
|
||||
if (!hasVictim)
|
||||
return;
|
||||
|
||||
if (_canAutoAttack)
|
||||
|
||||
Reference in New Issue
Block a user