From 088bbbd328ec99903c02d8bc635a2345f168dba7 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Thu, 31 Jul 2025 22:36:52 +0200 Subject: [PATCH] Core/Units: make use of the PlayHoverAnim update flag to store the play hover anim state * this fixes playing hover animations for units which have enabled their hover animation without using anim tiers --- src/server/game/Entities/Unit/Unit.cpp | 3 +-- src/server/game/Entities/Unit/Unit.h | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a2a2934649..3db316b72a 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -378,7 +378,6 @@ Unit::Unit(bool isWorldObject) : _oldFactionId = 0; _isWalkingBeforeCharm = false; - _playHoverAnim = false; } //////////////////////////////////////////////////////////// @@ -13636,7 +13635,7 @@ void Unit::SetPlayHoverAnim(bool enable, bool sendUpdate /*= true*/) if (IsPlayingHoverAnim() == enable) return; - _playHoverAnim = enable; + m_updateFlag.PlayerHoverAnim = enable; if (!sendUpdate) return; diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index d631711ec6..3fc959051c 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1043,7 +1043,7 @@ class TC_GAME_API Unit : public WorldObject void MonsterMoveWithSpeed(float x, float y, float z, float speed, bool generatePath = false, bool forceDestination = false); - bool IsPlayingHoverAnim() const { return _playHoverAnim; } + bool IsPlayingHoverAnim() const { return m_updateFlag.PlayerHoverAnim; } void SetPlayHoverAnim(bool enable, bool sendUpdate = true); bool IsGravityDisabled() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY); } @@ -1792,8 +1792,6 @@ class TC_GAME_API Unit : public WorldObject uint32 _oldFactionId; ///< faction before charm bool _isWalkingBeforeCharm; ///< Are we walking before we were charmed? - bool _playHoverAnim; - std::unique_ptr m_spellHistory; PositionUpdateInfo _positionUpdateInfo;