Skip to content
Permalink
Browse files

Core/Movement: Fix WaypointMovementGenerator ignoring EscortAI::SetEs…

…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 a9e534762f2517a37d595cdfef527ab55b6339ba
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -55,6 +55,10 @@ void WaypointMovementGenerator<Creature>::Pause(uint32 timer/* = 0*/)
{
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

This comment has been minimized.

Copy link
@illfated

illfated Feb 2, 2020

Heh, that is correct. I wish I had taken the time to comment on this typo before the PR was merged.
(It is only a comment, so it should preferably be corrected when the file needs other changes later.)

if (HasFlag(MOVEMENTGENERATOR_FLAG_PAUSED))
return;

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

0 comments on commit a9e5347

Please sign in to comment.
You can’t perform that action at this time.