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 | |
parent | 88eccd2956746807d69df6a5246e9288db8aef3f (diff) |
Core/Units: Rename AnimationTier to AnimTier for consistency with master branch
Diffstat (limited to 'src')
16 files changed, 47 insertions, 47 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 diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index f3c00e15450..97149b6ae64 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -699,7 +699,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos, Optional<float> velo Movement::MoveSplineInit init(_owner); init.MoveTo(PositionToVector3(pos), false); - init.SetAnimation(AnimationTier::Ground); + init.SetAnimation(AnimTier::Ground); if (velocity) init.SetVelocity(*velocity); Add(new GenericMovementGenerator(std::move(init), EFFECT_MOTION_TYPE, id)); @@ -711,7 +711,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, Optional<float> v Movement::MoveSplineInit init(_owner); init.MoveTo(PositionToVector3(pos), false); - init.SetAnimation(AnimationTier::Hover); + init.SetAnimation(AnimTier::Hover); if (velocity) init.SetVelocity(*velocity); Add(new GenericMovementGenerator(std::move(init), EFFECT_MOTION_TYPE, id)); @@ -857,7 +857,7 @@ void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool { init.SetFly(); init.SetCyclic(); - init.SetAnimation(AnimationTier::Hover); + init.SetAnimation(AnimTier::Hover); } else { diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index 4f2f7b3133d..3e706099842 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -351,10 +351,10 @@ void WaypointMovementGenerator<Creature>::StartMove(Creature* owner, bool relaun switch (waypoint.moveType) { case WAYPOINT_MOVE_TYPE_LAND: - init.SetAnimation(AnimationTier::Ground); + init.SetAnimation(AnimTier::Ground); break; case WAYPOINT_MOVE_TYPE_TAKEOFF: - init.SetAnimation(AnimationTier::Hover); + init.SetAnimation(AnimTier::Hover); break; case WAYPOINT_MOVE_TYPE_RUN: init.SetWalk(false); diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h index c2a6b58c448..e4e641f9711 100644 --- a/src/server/game/Movement/Spline/MoveSpline.h +++ b/src/server/game/Movement/Spline/MoveSpline.h @@ -22,7 +22,7 @@ #include "MoveSplineInitArgs.h" #include <G3D/Vector3.h> -enum class AnimationTier : uint8; +enum class AnimTier : uint8; namespace Movement { @@ -126,7 +126,7 @@ namespace Movement int32 currentPathIdx() const; bool HasAnimation() const { return splineflags.animation; } - AnimationTier GetAnimationTier() const { return static_cast<AnimationTier>(splineflags.animTier); } + AnimTier GetAnimTier() const { return static_cast<AnimTier>(splineflags.animTier); } bool onTransport; std::string ToString() const; diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h index 7567e504c58..7a6df3fadb9 100644 --- a/src/server/game/Movement/Spline/MoveSplineFlag.h +++ b/src/server/game/Movement/Spline/MoveSplineFlag.h @@ -58,7 +58,7 @@ namespace Movement // Masks Mask_Final_Facing = Final_Point | Final_Target | Final_Angle, - // animation ids stored here, see AnimationTier enum, used with Animation flag + // animation ids stored here, see AnimTier enum, used with Animation flag Mask_Animations = 0xFF, // flags that shouldn't be appended into SMSG_MONSTER_MOVE\SMSG_MONSTER_MOVE_TRANSPORT packet, should be more probably Mask_No_Monster_Move = Mask_Final_Facing | Mask_Animations | Done, diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h index 31a4dac19a0..c660f5e4f7c 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.h +++ b/src/server/game/Movement/Spline/MoveSplineInit.h @@ -22,7 +22,7 @@ class Unit; -enum class AnimationTier : uint8; +enum class AnimTier : uint8; namespace Movement { @@ -70,7 +70,7 @@ namespace Movement /* Plays animation after movement done * can't be combined with parabolic movement */ - void SetAnimation(AnimationTier anim); + void SetAnimation(AnimTier anim); /* Adds final facing animation * sets unit's facing to specified point/angle after all path done @@ -161,7 +161,7 @@ namespace Movement args.flags.EnableParabolic(); } - inline void MoveSplineInit::SetAnimation(AnimationTier anim) + inline void MoveSplineInit::SetAnimation(AnimTier anim) { args.time_perc = 0.f; args.flags.EnableAnimation((uint8)anim); diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp index 3f5a8c31672..301e4e1cdcb 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp @@ -251,7 +251,7 @@ struct boss_jedoga_shadowseeker : public BossAI if (_initiateGUIDS.empty()) { DoCastSelf(SPELL_HOVER_FALL_1); - me->SetAnimationTier(AnimationTier::Ground); + me->SetAnimTier(AnimTier::Ground); events.ScheduleEvent(EVENT_START_FIGHT_1, Seconds(1)); } } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index fc29c58ee81..9024f032af2 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -210,7 +210,7 @@ struct boss_blood_queen_lana_thel : public BossAI if (Creature* minchar = me->FindNearestCreature(NPC_INFILTRATOR_MINCHAR_BQ, 200.0f)) { minchar->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); - minchar->SetAnimationTier(AnimationTier::Ground); + minchar->SetAnimTier(AnimTier::Ground); minchar->SetCanFly(false); minchar->RemoveAllAuras(); minchar->GetMotionMaster()->MoveCharge(4629.3711f, 2782.6089f, 401.5301f, SPEED_CHARGE / 3.0f); @@ -399,7 +399,7 @@ struct boss_blood_queen_lana_thel : public BossAI break; } case EVENT_DELIRIOUS_SLASH: - if (_offtankGUID && me->GetAnimationTier() != AnimationTier::Fly) + if (_offtankGUID && me->GetAnimTier() != AnimTier::Fly) if (Player* _offtank = ObjectAccessor::GetPlayer(*me, _offtankGUID)) DoCast(_offtank, SPELL_DELIRIOUS_SLASH); events.ScheduleEvent(EVENT_DELIRIOUS_SLASH, 20s, 24s, EVENT_GROUP_NORMAL); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index b992066dd1c..6a9eacaedfd 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -1133,7 +1133,7 @@ class boss_aerial_command_unit : public CreatureScript me->SetReactState(REACT_PASSIVE); me->AttackStop(); me->SetDisableGravity(true); - me->SetAnimationTier(AnimationTier::Ground); + me->SetAnimTier(AnimTier::Ground); DoCastSelf(SPELL_VEHICLE_DAMAGED, true); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index 21750fc9296..aeebee883fc 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -209,7 +209,7 @@ struct npc_enslaved_proto_drake : public ScriptedAI { if (type == WAYPOINT_MOTION_TYPE && id == POINT_LAST) { - me->SetAnimationTier(AnimationTier::Ground); + me->SetAnimTier(AnimTier::Ground); } } @@ -218,7 +218,7 @@ struct npc_enslaved_proto_drake : public ScriptedAI if (type == TYPE_PROTODRAKE_AT && data == DATA_PROTODRAKE_MOVE && !_setData && me->GetDistance(protodrakeCheckPos) < 5.0f) { _setData = true; - me->SetAnimationTier(AnimationTier::Fly); + me->SetAnimTier(AnimTier::Fly); me->GetMotionMaster()->MovePath(PATH_PROTODRAKE, false); } } |