aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRothend <67004168+Rothend@users.noreply.github.com>2020-06-24 21:32:21 +0200
committerShauren <shauren.trinity@gmail.com>2022-01-18 00:17:44 +0100
commit381333690b33c9148e994d9f68e7d12f1d5dc31d (patch)
treedc7255097cc5b89fa1403e16ebf746cd66e79702 /src
parentd4a1a7a040be0ca0d6428669135bcc64d92be1c2 (diff)
Core/SAI: do not allow the waypoint pause timer to update while in combat. (#24877)
(cherry picked from commit 37cb39179629c90afb09324864bd31bddb9bd07c)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp8
1 files changed, 4 insertions, 4 deletions
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
{