mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 14:10:18 -04:00
Core/SAI: Fix SMART_ACTION_WP_PAUSE with 0 delay pausing the path only for 1 world loop update (#25471)
* Core/SAI: Fix SMART_ACTION_WP_PAUSE with 0 delay pausing the path only for 1 world loop update
* Add code comments
* Remove special handling of SMART_ACTION_WP_PAUSE in SMART_EVENT_WAYPOINT_REACHED
(cherry picked from commit 7dd51ae6d9)
This commit is contained in:
@@ -1469,7 +1469,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
|
||||
uint32 delay = e.action.wpPause.delay;
|
||||
ENSURE_AI(SmartAI, me->AI())->PausePath(delay, e.GetEventType() == SMART_EVENT_WAYPOINT_REACHED ? false : true);
|
||||
ENSURE_AI(SmartAI, me->AI())->PausePath(delay, true);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_WP_STOP:
|
||||
@@ -1488,7 +1488,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!IsSmart())
|
||||
break;
|
||||
|
||||
ENSURE_AI(SmartAI, me->AI())->SetWPPauseTimer(0);
|
||||
// Set the timer to 1 ms so the path will be resumed on next update loop
|
||||
ENSURE_AI(SmartAI, me->AI())->SetWPPauseTimer(1);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_ORIENTATION:
|
||||
|
||||
Reference in New Issue
Block a user