Core/SAI: do not allow the waypoint pause timer to update while in combat.

Port From (https://github.com/TrinityCore/TrinityCore/commit/381333690b33c9148e994d9f68e7d12f1d5dc31d)
This commit is contained in:
hondacrx
2022-02-27 13:58:30 -05:00
parent 1b28a8260c
commit aff47f6501
+3 -3
View File
@@ -1000,15 +1000,15 @@ namespace Game.AI
// handle pause // handle pause
if (HasEscortState(SmartEscortState.Paused) && (_waypointReached || _waypointPauseForced)) 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(); ResumePath();
}
else else
_waypointPauseTimer -= diff; _waypointPauseTimer -= diff;
} }
}
else if (_waypointPathEnded) // end path else if (_waypointPathEnded) // end path
{ {
_waypointPathEnded = false; _waypointPathEnded = false;