diff options
| author | Shauren <shauren.trinity@gmail.com> | 2022-03-24 20:38:55 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-24 20:38:55 +0100 |
| commit | 62c2ceaff2359b0ce3ca9aa925cedf5334161160 (patch) | |
| tree | dd196f47746bc0065d0fd62e37eaf1f17cafaabe /src/server/game/Entities | |
| parent | 88eccd2956746807d69df6a5246e9288db8aef3f (diff) | |
Core/Units: Rename AnimationTier to AnimTier for consistency with master branch
Diffstat (limited to 'src/server/game/Entities')
| -rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 26 | ||||
| -rw-r--r-- | src/server/game/Entities/Creature/Creature.h | 4 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.h | 4 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.h | 8 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/UnitDefines.h | 2 |
7 files changed, 30 insertions, 30 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 733a5e92c75..3660518b1e8 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2528,7 +2528,7 @@ bool Creature::LoadCreaturesAddon() SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_PET_TALENTS, 0); SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_VIS_FLAG, uint8((cainfo->bytes1 >> 16) & 0xFF)); - SetAnimationTier(static_cast<AnimationTier>((cainfo->bytes1 >> 24) & 0xFF)); + SetAnimTier(static_cast<AnimTier>((cainfo->bytes1 >> 24) & 0xFF)); //! Suspected correlation between UNIT_FIELD_BYTES_1, offset 3, value 0x2: //! If no inhabittype_fly (if no MovementFlag_DisableGravity or MovementFlag_CanFly flag found in sniffs) @@ -2927,21 +2927,21 @@ bool Creature::SetWalk(bool enable) return true; } -bool Creature::SetDisableGravity(bool disable, bool packetOnly /*=false*/, bool updateAnimationTier /*= true*/) +bool Creature::SetDisableGravity(bool disable, bool packetOnly /*=false*/, bool updateAnimTier /*= true*/) { //! It's possible only a packet is sent but moveflags are not updated //! Need more research on this - if (!packetOnly && !Unit::SetDisableGravity(disable, packetOnly, updateAnimationTier)) + if (!packetOnly && !Unit::SetDisableGravity(disable, packetOnly, updateAnimTier)) return false; - if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted()) + if (updateAnimTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted()) { if (IsGravityDisabled()) - SetAnimationTier(AnimationTier::Fly); + SetAnimTier(AnimTier::Fly); else if (IsHovering()) - SetAnimationTier(AnimationTier::Hover); + SetAnimTier(AnimTier::Hover); else - SetAnimationTier(AnimationTier::Ground); + SetAnimTier(AnimTier::Ground); } if (!movespline->Initialized()) @@ -3009,19 +3009,19 @@ bool Creature::SetFeatherFall(bool enable, bool packetOnly /* = false */) return true; } -bool Creature::SetHover(bool enable, bool packetOnly /*= false*/, bool updateAnimationTier /*= true*/) +bool Creature::SetHover(bool enable, bool packetOnly /*= false*/, bool updateAnimTier /*= true*/) { - if (!packetOnly && !Unit::SetHover(enable, packetOnly, updateAnimationTier)) + if (!packetOnly && !Unit::SetHover(enable, packetOnly, updateAnimTier)) return false; - if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted()) + if (updateAnimTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted()) { if (IsGravityDisabled()) - SetAnimationTier(AnimationTier::Fly); + SetAnimTier(AnimTier::Fly); else if (IsHovering()) - SetAnimationTier(AnimationTier::Hover); + SetAnimTier(AnimTier::Hover); else - SetAnimationTier(AnimationTier::Ground); + SetAnimTier(AnimTier::Ground); } if (!movespline->Initialized()) diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 73ed5371b05..8f1666ccfbe 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -154,12 +154,12 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma CreatureAI* AI() const { return reinterpret_cast<CreatureAI*>(GetAI()); } bool SetWalk(bool enable) override; - bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true) override; + bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimTier = true) override; bool SetSwim(bool enable) override; bool SetCanFly(bool enable, bool packetOnly = false) override; bool SetWaterWalking(bool enable, bool packetOnly = false) override; bool SetFeatherFall(bool enable, bool packetOnly = false) override; - bool SetHover(bool enable, bool packetOnly = false, bool updateAnimationTier = true) override; + bool SetHover(bool enable, bool packetOnly = false, bool updateAnimTier = true) override; uint32 GetShieldBlockValue() const override; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 8c3fcafaf83..9ec2fc4e1c5 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -26588,9 +26588,9 @@ bool Player::IsInWhisperWhiteList(ObjectGuid guid) return false; } -bool Player::SetDisableGravity(bool disable, bool packetOnly /*= false*/, bool updateAnimationTier /*= true*/) +bool Player::SetDisableGravity(bool disable, bool packetOnly /*= false*/, bool updateAnimTier /*= true*/) { - if (!packetOnly && !Unit::SetDisableGravity(disable, packetOnly, updateAnimationTier)) + if (!packetOnly && !Unit::SetDisableGravity(disable, packetOnly, updateAnimTier)) return false; WorldPacket data(disable ? SMSG_MOVE_GRAVITY_DISABLE : SMSG_MOVE_GRAVITY_ENABLE, 12); @@ -26627,9 +26627,9 @@ bool Player::SetCanFly(bool apply, bool packetOnly /*= false*/) return false; } -bool Player::SetHover(bool apply, bool packetOnly /*= false*/, bool updateAnimationTier /*= true*/) +bool Player::SetHover(bool apply, bool packetOnly /*= false*/, bool updateAnimTier /*= true*/) { - if (!packetOnly && !Unit::SetHover(apply, packetOnly, updateAnimationTier)) + if (!packetOnly && !Unit::SetHover(apply, packetOnly, updateAnimTier)) return false; WorldPacket data(apply ? SMSG_MOVE_SET_HOVER : SMSG_MOVE_UNSET_HOVER, 12); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index b5ddaca836c..376ebe3f72e 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2168,11 +2168,11 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> bool IsInWhisperWhiteList(ObjectGuid guid); void RemoveFromWhisperWhiteList(ObjectGuid guid) { WhisperList.remove(guid); } - bool SetDisableGravity(bool disable, bool packetOnly /* = false */, bool updateAnimationTier = true) override; + bool SetDisableGravity(bool disable, bool packetOnly /* = false */, bool updateAnimTier = 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, bool updateAnimationTier = true) override; + bool SetHover(bool enable, bool packetOnly = false, bool updateAnimTier = true) override; bool CanFly() const override { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); } bool CanEnterWater() const override { return true; } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f31760dab2a..ba811094c58 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -540,7 +540,7 @@ void Unit::UpdateSplineMovement(uint32 t_diff) DisableSpline(); if (movespline->HasAnimation()) - SetAnimationTier(movespline->GetAnimationTier()); + SetAnimTier(movespline->GetAnimTier()); } UpdateSplinePosition(); @@ -10350,7 +10350,7 @@ bool Unit::IsPolymorphed() const return spellInfo->GetSpellSpecific() == SPELL_SPECIFIC_MAGE_POLYMORPH; } -void Unit::SetAnimationTier(AnimationTier tier) +void Unit::SetAnimTier(AnimTier tier) { if (!IsCreature()) return; @@ -13295,7 +13295,7 @@ bool Unit::SetWalk(bool enable) return true; } -bool Unit::SetDisableGravity(bool disable, bool /*packetOnly = false*/, bool /*updateAnimationTier = true*/) +bool Unit::SetDisableGravity(bool disable, bool /*packetOnly = false*/, bool /*updateAnimTier = true*/) { if (disable == IsGravityDisabled()) return false; @@ -13362,7 +13362,7 @@ bool Unit::SetFeatherFall(bool enable, bool /*packetOnly = false */) return true; } -bool Unit::SetHover(bool enable, bool /*packetOnly = false*/, bool /*updateAnimationTier = true*/) +bool Unit::SetHover(bool enable, bool /*packetOnly = false*/, bool /*updateAnimTier = true*/) { if (enable == HasUnitMovementFlag(MOVEMENTFLAG_HOVER)) return false; diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 795c631358e..1eeb501dc26 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -959,8 +959,8 @@ class TC_GAME_API Unit : public WorldObject bool IsStandState() const; void SetStandState(uint8 state); - void SetAnimationTier(AnimationTier tier); - AnimationTier GetAnimationTier() const { return static_cast<AnimationTier>(GetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER)); } + void SetAnimTier(AnimTier tier); + AnimTier GetAnimTier() const { return static_cast<AnimTier>(GetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER)); } void SetStandFlags(uint8 flags) { SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_VIS_FLAG, flags); } void RemoveStandFlags(uint8 flags) { RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_VIS_FLAG, flags); } @@ -1166,12 +1166,12 @@ class TC_GAME_API Unit : public WorldObject bool IsWalking() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING); } bool IsHovering() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_HOVER); } virtual bool SetWalk(bool enable); - virtual bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true); + virtual bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimTier = true); virtual bool SetSwim(bool enable); virtual bool SetCanFly(bool enable, bool packetOnly = false); virtual bool SetWaterWalking(bool enable, bool packetOnly = false); virtual bool SetFeatherFall(bool enable, bool packetOnly = false); - virtual bool SetHover(bool enable, bool packetOnly = false, bool updateAnimationTier = true); + virtual bool SetHover(bool enable, bool packetOnly = false, bool updateAnimTier = true); void SetInFront(WorldObject const* target); void SetFacingTo(float const ori, bool force = true); diff --git a/src/server/game/Entities/Unit/UnitDefines.h b/src/server/game/Entities/Unit/UnitDefines.h index f0425afa94c..269798d99bb 100644 --- a/src/server/game/Entities/Unit/UnitDefines.h +++ b/src/server/game/Entities/Unit/UnitDefines.h @@ -78,7 +78,7 @@ enum UnitBytes2Offsets : uint8 }; // UNIT_FIELD_BYTES_1 (UNIT_BYTES_1_OFFSET_ANIM_TIER) -enum class AnimationTier : uint8 +enum class AnimTier : uint8 { Ground = 0, // plays ground tier animations Swim = 1, // falls back to ground tier animations, not handled by the client, should never appear in sniffs, will prevent tier change animations from playing correctly if used |
