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);
|
CheckConditions(diff);
|
||||||
|
|
||||||
|
bool hasVictim = UpdateVictim();
|
||||||
|
|
||||||
GetScript().OnUpdate(diff);
|
GetScript().OnUpdate(diff);
|
||||||
|
|
||||||
UpdatePath(diff);
|
UpdatePath(diff);
|
||||||
@@ -340,7 +342,7 @@ namespace Game.AI
|
|||||||
if (!IsAIControlled())
|
if (!IsAIControlled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!UpdateVictim())
|
if (!hasVictim)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_canAutoAttack)
|
if (_canAutoAttack)
|
||||||
|
|||||||
Reference in New Issue
Block a user