Skip to content

Commit

Permalink
Core/Movement: Fix WaypointMovementGenerator ignoring EscortAI::SetEs…
Browse files Browse the repository at this point in the history
…cortPaused() 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.
  • Loading branch information
jackpoz committed Feb 1, 2020
1 parent 573ddf4 commit a9e5347
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -55,6 +55,10 @@ void WaypointMovementGenerator<Creature>::Pause(uint32 timer/* = 0*/)
{ {
if (timer) if (timer)
{ {
// Don't try to paused an already paused generator

This comment has been minimized.

Copy link
@Faq

Faq Feb 1, 2020

Contributor

shouldn't be so?

Don't try to pause an already paused generator

if (HasFlag(MOVEMENTGENERATOR_FLAG_PAUSED))
return;

AddFlag(MOVEMENTGENERATOR_FLAG_TIMED_PAUSED); AddFlag(MOVEMENTGENERATOR_FLAG_TIMED_PAUSED);
_nextMoveTime.Reset(timer); _nextMoveTime.Reset(timer);
RemoveFlag(MOVEMENTGENERATOR_FLAG_PAUSED); RemoveFlag(MOVEMENTGENERATOR_FLAG_PAUSED);
Expand Down

0 comments on commit a9e5347

Please sign in to comment.