fix(Core/Movement): Send proper movement animation visuals. (#10843)

Fixed #10812
Fixed #10814
This commit is contained in:
UltraNix
2022-03-06 18:31:41 +01:00
committed by GitHub
parent 41cc053c68
commit 617d85a498
7 changed files with 37 additions and 36 deletions

View File

@@ -15397,7 +15397,7 @@ bool Player::IsInWhisperWhiteList(ObjectGuid guid)
return false;
}
bool Player::SetDisableGravity(bool disable, bool packetOnly /*= false*/)
bool Player::SetDisableGravity(bool disable, bool packetOnly /*= false*/, bool /*updateAnimationTier = true*/)
{
if (!packetOnly && !Unit::SetDisableGravity(disable))
return false;
@@ -15436,7 +15436,7 @@ bool Player::SetCanFly(bool apply, bool packetOnly /*= false*/)
return true;
}
bool Player::SetHover(bool apply, bool packetOnly /*= false*/)
bool Player::SetHover(bool apply, bool packetOnly /*= false*/, bool /*updateAnimationTier = true*/)
{
// moved inside, flag can be removed on landing and wont send appropriate packet to client when aura is removed
if (!packetOnly /* && !Unit::SetHover(apply)*/)

View File

@@ -2505,11 +2505,11 @@ public:
bool IsInWhisperWhiteList(ObjectGuid guid);
void RemoveFromWhisperWhiteList(ObjectGuid guid) { WhisperList.remove(guid); }
bool SetDisableGravity(bool disable, bool packetOnly /* = false */) override;
bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true) override;
bool SetCanFly(bool apply, bool packetOnly = false) override;
bool SetWaterWalking(bool apply, bool packetOnly = false) override;
bool SetFeatherFall(bool apply, bool packetOnly = false) override;
bool SetHover(bool enable, bool packetOnly = false) override;
bool SetHover(bool enable, bool packetOnly = false, bool updateAnimationTier = true) override;
[[nodiscard]] bool CanFly() const override { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); }
[[nodiscard]] bool CanEnterWater() const override { return true; }