From aff47f650121dbee39dcc5a0a305a2367524fdd6 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 27 Feb 2022 13:58:30 -0500 Subject: [PATCH] Core/SAI: do not allow the waypoint pause timer to update while in combat. Port From (https://github.com/TrinityCore/TrinityCore/commit/381333690b33c9148e994d9f68e7d12f1d5dc31d) --- Source/Game/AI/SmartScripts/SmartAI.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Game/AI/SmartScripts/SmartAI.cs b/Source/Game/AI/SmartScripts/SmartAI.cs index 2d1540f05..55877a7c7 100644 --- a/Source/Game/AI/SmartScripts/SmartAI.cs +++ b/Source/Game/AI/SmartScripts/SmartAI.cs @@ -1001,13 +1001,13 @@ namespace Game.AI // handle pause if (HasEscortState(SmartEscortState.Paused) && (_waypointReached || _waypointPauseForced)) { - if (_waypointPauseTimer < diff) + if (!me.IsInCombat() && !HasEscortState(SmartEscortState.Returning)) { - if (!me.IsInCombat() && !HasEscortState(SmartEscortState.Returning)) + if (_waypointPauseTimer <= diff) ResumePath(); + else + _waypointPauseTimer -= diff; } - else - _waypointPauseTimer -= diff; } else if (_waypointPathEnded) // end path {