From 381333690b33c9148e994d9f68e7d12f1d5dc31d Mon Sep 17 00:00:00 2001 From: Rothend <67004168+Rothend@users.noreply.github.com> Date: Wed, 24 Jun 2020 21:32:21 +0200 Subject: Core/SAI: do not allow the waypoint pause timer to update while in combat. (#24877) (cherry picked from commit 37cb39179629c90afb09324864bd31bddb9bd07c) --- src/server/game/AI/SmartScripts/SmartAI.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index a0afd620c77..9ab51c65463 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -940,13 +940,13 @@ void SmartAI::UpdatePath(uint32 diff) // handle pause if (HasEscortState(SMART_ESCORT_PAUSED) && (_waypointReached || _waypointPauseForced)) { - if (_waypointPauseTimer <= diff) + if (!me->IsInCombat() && !HasEscortState(SMART_ESCORT_RETURNING)) { - if (!me->IsInCombat() && !HasEscortState(SMART_ESCORT_RETURNING)) + if (_waypointPauseTimer <= diff) ResumePath(); + else + _waypointPauseTimer -= diff; } - else - _waypointPauseTimer -= diff; } else if (_waypointPathEnded) // end path { -- cgit v1.2.3