Core/AI: EscortAI::SetRun now also adjusts already-in-progress waypoint paths, as opposed to only affecting future path loading.

Port From (https://github.com/TrinityCore/TrinityCore/commit/58000148d321d1f0dde96667974ea912e0a8356e)
This commit is contained in:
hondacrx
2021-10-30 19:57:05 -04:00
parent f2eb6a9044
commit 4d03ced335
@@ -358,10 +358,13 @@ namespace Game.AI
public void SetRun(bool on = true)
{
if (on && !_running)
me.SetWalk(false);
else if (!on && _running)
me.SetWalk(true);
if (on == _running)
return;
foreach (var node in _path.nodes)
node.moveType = on ? WaypointMoveType.Run : WaypointMoveType.Walk;
me.SetWalk(!on);
_running = on;
}