Core/SAI: Fix SMART_ACTION_WP_PAUSE with 0 delay pausing the path only for 1 world loop update

Port From (https://github.com/TrinityCore/TrinityCore/commit/60519e947f634f12aa93a1871d53e012ed9e57d2)
This commit is contained in:
hondacrx
2022-05-24 10:04:06 -04:00
parent 17feb111df
commit a4d5b9eb6f
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -1383,7 +1383,7 @@ namespace Game.AI
break;
uint delay = e.Action.wpPause.delay;
((SmartAI)_me.GetAI()).PausePath(delay, e.GetEventType() != SmartEvents.WaypointReached);
((SmartAI)_me.GetAI()).PausePath(delay, true);
break;
}
case SmartActions.WpStop:
@@ -1402,7 +1402,8 @@ namespace Game.AI
if (!IsSmart())
break;
((SmartAI)_me.GetAI()).SetWPPauseTimer(0);
// Set the timer to 1 ms so the path will be resumed on next update loop
((SmartAI)_me.GetAI()).SetWPPauseTimer(1);
break;
}
case SmartActions.SetOrientation: