mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Core/Movement: Fix WaypointMovementGenerator ignoring EscortAI::SetEscortPaused() on Gossip Hello (#24005)
Fix WaypointMovementGenerator ignoring EscortAI::SetEscortPaused() when talking to a NPC, scheduling a 3 minutes pause on the WaypointMovementGenerator even if it was already disabled with no timer, waiting for the player to select a gossip entry to resume the movement.
(cherry picked from commit a9e534762f)
This commit is contained in:
@@ -56,6 +56,10 @@ void WaypointMovementGenerator<Creature>::Pause(uint32 timer/* = 0*/)
|
||||
{
|
||||
if (timer)
|
||||
{
|
||||
// Don't try to paused an already paused generator
|
||||
if (HasFlag(MOVEMENTGENERATOR_FLAG_PAUSED))
|
||||
return;
|
||||
|
||||
AddFlag(MOVEMENTGENERATOR_FLAG_TIMED_PAUSED);
|
||||
_nextMoveTime.Reset(timer);
|
||||
RemoveFlag(MOVEMENTGENERATOR_FLAG_PAUSED);
|
||||
|
||||
Reference in New Issue
Block a user