diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e16611b39..08d96c93d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10852,10 +10852,13 @@ void Unit::SendPetAIReaction() ///----------End of Pet responses methods---------- -void Unit::StopMoving() +void Unit::StopMoving(bool forceSendStop /*=false*/) { clearUnitState(UNIT_STAT_MOVING); + if (IsStopped() && !forceSendStop) + return; + // not need send any packets if not in world if (!IsInWorld()) return; diff --git a/src/game/Unit.h b/src/game/Unit.h index e3f046cfd..ee22126d6 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -2675,7 +2675,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject MotionMaster* GetMotionMaster() { return &i_motionMaster; } bool IsStopped() const { return !(hasUnitState(UNIT_STAT_MOVING)); } - void StopMoving(); + void StopMoving(bool forceSendStop = false); void SetFeared(bool apply, ObjectGuid casterGuid = ObjectGuid(), uint32 spellID = 0, uint32 time = 0); void SetConfused(bool apply, ObjectGuid casterGuid = ObjectGuid(), uint32 spellID = 0); diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index 7a03d7388..74981924d 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -320,7 +320,7 @@ void FlightPathMovementGenerator::Finalize(Player& player) // update z position to ground and orientation for landing point // this prevent cheating with landing point at lags // when client side flight end early in comparison server side - player.StopMoving(); + player.StopMoving(true); } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 3fb6696ce..f1d8d594b 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12673" + #define REVISION_NR "12674" #endif // __REVISION_NR_H__