aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoName <322016+Faq@users.noreply.github.com>2020-09-08 18:12:52 +0300
committerGitHub <noreply@github.com>2020-09-08 17:12:52 +0200
commitdad187615df603ad8614531a0ec84c1a5e136838 (patch)
tree2e0fa2b671a3645da2f10ba654c7cc2c1b816db9
parent9e8915eaac70c0fd6dab98beeaddef59f2741b42 (diff)
Core/Movement: Corrected Animation Tier handling (PR #24875)
Co-authored-by: Warpten <vertozor@gmail.com> Co-authored-by: Ovahlord <dreadkiller@gmx.de> Co-authored-by: Carbenium <carbenium@outlook.com>
-rw-r--r--sql/updates/world/3.3.5/2020_08_xx_xx_world.sql15
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp37
-rw-r--r--src/server/game/Entities/Creature/Creature.h4
-rw-r--r--src/server/game/Entities/Player/Player.cpp12
-rw-r--r--src/server/game/Entities/Player/Player.h4
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp18
-rw-r--r--src/server/game/Entities/Unit/Unit.h7
-rw-r--r--src/server/game/Entities/Unit/UnitDefines.h13
-rw-r--r--src/server/game/Movement/MotionMaster.cpp6
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp4
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.h5
-rw-r--r--src/server/game/Movement/Spline/MoveSplineFlag.h2
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.h13
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp2
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp5
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp9
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp7
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp5
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp7
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp5
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp1
-rw-r--r--src/server/scripts/Outland/zone_shadowmoon_valley.cpp1
27 files changed, 109 insertions, 84 deletions
diff --git a/sql/updates/world/3.3.5/2020_08_xx_xx_world.sql b/sql/updates/world/3.3.5/2020_08_xx_xx_world.sql
new file mode 100644
index 00000000000..97bfb0b992d
--- /dev/null
+++ b/sql/updates/world/3.3.5/2020_08_xx_xx_world.sql
@@ -0,0 +1,15 @@
+-- Disable movement flag updates for Grauf and let script handle them
+UPDATE `creature_template` SET `flags_extra` = `flags_extra`| 0x200 WHERE `entry`=26893;
+-- Disable movement flag updates for Blood-Queen Lana'thel
+UPDATE `creature_template_movement` SET `Ground`= 1, `Flight`= 0 WHERE `CreatureId` IN (37955, 38434, 38435, 38436);
+UPDATE `creature_template` SET `flags_extra`= `flags_extra` | 0x200 WHERE `entry` IN (37955, 38434, 38435, 38436);
+-- Disable movement flag updates for Malygos
+UPDATE `creature_template` SET `flags_extra`= `flags_extra` | 0x200 WHERE `entry` IN (28859, 31734);
+-- Disable movement flag updates for Razorscale
+UPDATE `creature_template` SET `flags_extra`= `flags_extra` | 0x200 WHERE `entry` IN (33186, 33724);
+UPDATE `creature_template_movement` SET `Ground`= 1 WHERE `CreatureId` IN (33186, 33724);
+-- Disable movement flag updates for Enslaved Proto-Drake
+UPDATE `creature_template` SET `flags_extra`= `flags_extra` | 0x200 WHERE `entry` IN (24083, 31669);
+UPDATE `creature_template_movement` SET `Ground`= 1 WHERE `CreatureId` IN (24083, 31669);
+-- Disable movement flag updates for Enslaved Netherwing Drake
+UPDATE `creature_template` SET `flags_extra` = `flags_extra`| 0x200 WHERE `entry`=21722;
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 44596a1370a..ae0a2979fc7 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1952,6 +1952,7 @@ void Creature::setDeathState(DeathState s)
uint32 respawnDelay = m_respawnDelay;
if (uint32 scalingMode = sWorld->getIntConfig(CONFIG_RESPAWN_DYNAMICMODE))
GetMap()->ApplyDynamicModeRespawnScaling(this, m_spawnId, respawnDelay, scalingMode);
+
// @todo remove the boss respawn time hack in a dynspawn follow-up once we have creature groups in instances
if (m_respawnCompatibilityMode)
{
@@ -1986,8 +1987,9 @@ void Creature::setDeathState(DeathState s)
if (m_formation && m_formation->GetLeader() == this)
m_formation->FormationReset(true);
- bool needsFalling = IsFlying() || IsHovering();
- SetHover(false);
+ bool needsFalling = (IsFlying() || IsHovering()) && !IsUnderWater();
+ SetHover(false, false);
+ SetDisableGravity(false, false);
if (needsFalling)
GetMotionMaster()->MoveFall();
@@ -2516,7 +2518,8 @@ bool Creature::LoadCreaturesAddon()
//SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_PET_TALENTS, uint8((cainfo->bytes1 >> 8) & 0xFF));
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));
- SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, uint8((cainfo->bytes1 >> 24) & 0xFF));
+
+ SetAnimationTier(static_cast<AnimationTier>((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)
@@ -2884,13 +2887,23 @@ bool Creature::SetWalk(bool enable)
return true;
}
-bool Creature::SetDisableGravity(bool disable, bool packetOnly/*=false*/)
+bool Creature::SetDisableGravity(bool disable, bool packetOnly /*=false*/, bool updateAnimationTier /*= true*/)
{
//! It's possible only a packet is sent but moveflags are not updated
//! Need more research on this
- if (!packetOnly && !Unit::SetDisableGravity(disable))
+ if (!packetOnly && !Unit::SetDisableGravity(disable, packetOnly, updateAnimationTier))
return false;
+ if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted())
+ {
+ if (IsGravityDisabled())
+ SetAnimationTier(AnimationTier::Fly);
+ else if (IsHovering())
+ SetAnimationTier(AnimationTier::Hover);
+ else
+ SetAnimationTier(AnimationTier::Ground);
+ }
+
if (!movespline->Initialized())
return true;
@@ -2956,11 +2969,21 @@ bool Creature::SetFeatherFall(bool enable, bool packetOnly /* = false */)
return true;
}
-bool Creature::SetHover(bool enable, bool packetOnly /*= false*/)
+bool Creature::SetHover(bool enable, bool packetOnly /*= false*/, bool updateAnimationTier /*= true*/)
{
- if (!packetOnly && !Unit::SetHover(enable))
+ if (!packetOnly && !Unit::SetHover(enable, packetOnly, updateAnimationTier))
return false;
+ if (updateAnimationTier && IsAlive() && !HasUnitState(UNIT_STATE_ROOT) && !GetMovementTemplate().IsRooted())
+ {
+ if (IsGravityDisabled())
+ SetAnimationTier(AnimationTier::Fly);
+ else if (IsHovering())
+ SetAnimationTier(AnimationTier::Hover);
+ else
+ SetAnimationTier(AnimationTier::Ground);
+ }
+
if (!movespline->Initialized())
return true;
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 32c9a893c4a..b39ed00484b 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -147,12 +147,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) override;
+ bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = 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) override;
+ bool SetHover(bool enable, bool packetOnly = false, bool updateAnimationTier = 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 bee51fe316a..86009780b76 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -4562,9 +4562,6 @@ void Player::BuildPlayerRepop()
StopMirrorTimers(); //disable timers(bars)
- // set and clear other
- SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND);
-
// OnPlayerRepop hook
sScriptMgr->OnPlayerRepop(this);
}
@@ -4578,7 +4575,6 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
// speed change, land walk
// remove death flag + set aura
- SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, 0);
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
// This must be called always even on Players with race != RACE_NIGHTELF in case of faction change
@@ -26579,9 +26575,9 @@ 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))
+ if (!packetOnly && !Unit::SetDisableGravity(disable, packetOnly, updateAnimationTier))
return false;
WorldPacket data(disable ? SMSG_MOVE_GRAVITY_DISABLE : SMSG_MOVE_GRAVITY_ENABLE, 12);
@@ -26618,9 +26614,9 @@ bool Player::SetCanFly(bool apply, bool packetOnly /*= false*/)
return false;
}
-bool Player::SetHover(bool apply, bool packetOnly /*= false*/)
+bool Player::SetHover(bool apply, bool packetOnly /*= false*/, bool updateAnimationTier /*= true*/)
{
- if (!packetOnly && !Unit::SetHover(apply))
+ if (!packetOnly && !Unit::SetHover(apply, packetOnly, updateAnimationTier))
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 64473d7486c..5dc5dcf6924 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -2160,11 +2160,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 */) 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;
bool CanFly() const override { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); }
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 71d1176d87d..415992b1e0c 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -513,8 +513,13 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
}
if (arrived)
+ {
DisableSpline();
+ if (movespline->HasAnimation())
+ SetAnimationTier(movespline->GetAnimation());
+ }
+
UpdateSplinePosition();
}
@@ -10307,6 +10312,14 @@ bool Unit::IsPolymorphed() const
return spellInfo->GetSpellSpecific() == SPELL_SPECIFIC_MAGE_POLYMORPH;
}
+void Unit::SetAnimationTier(AnimationTier tier)
+{
+ if (!IsCreature())
+ return;
+
+ SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, static_cast<uint8>(tier));
+}
+
void Unit::RecalculateObjectScale()
{
int32 scaleAuras = GetTotalAuraModifier(SPELL_AURA_MOD_SCALE) + GetTotalAuraModifier(SPELL_AURA_MOD_SCALE_2);
@@ -13141,7 +13154,7 @@ bool Unit::SetWalk(bool enable)
return true;
}
-bool Unit::SetDisableGravity(bool disable, bool /*packetOnly = false*/)
+bool Unit::SetDisableGravity(bool disable, bool /*packetOnly = false*/, bool /*updateAnimationTier = true*/)
{
if (disable == IsGravityDisabled())
return false;
@@ -13153,6 +13166,7 @@ bool Unit::SetDisableGravity(bool disable, bool /*packetOnly = false*/)
}
else
RemoveUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);
+
return true;
}
@@ -13207,7 +13221,7 @@ bool Unit::SetFeatherFall(bool enable, bool /*packetOnly = false */)
return true;
}
-bool Unit::SetHover(bool enable, bool /*packetOnly = false*/)
+bool Unit::SetHover(bool enable, bool /*packetOnly = false*/, bool /*updateAnimationTier = 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 073087163d4..854b40e4ff0 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -923,6 +923,9 @@ 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 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); }
@@ -1121,12 +1124,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);
+ virtual bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = 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);
+ virtual bool SetHover(bool enable, bool packetOnly = false, bool updateAnimationTier = 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 1bd65509ed1..c5bb23c6463 100644
--- a/src/server/game/Entities/Unit/UnitDefines.h
+++ b/src/server/game/Entities/Unit/UnitDefines.h
@@ -77,13 +77,14 @@ enum UnitBytes2Offsets : uint8
UNIT_BYTES_2_OFFSET_SHAPESHIFT_FORM = 3
};
-// byte flags value (UNIT_FIELD_BYTES_1, 3)
-enum UnitBytes1_Flags : uint8
+// UNIT_FIELD_BYTES_1 (UNIT_BYTES_1_OFFSET_ANIM_TIER)
+enum class AnimationTier : uint8
{
- UNIT_BYTE1_FLAG_ALWAYS_STAND = 0x01,
- UNIT_BYTE1_FLAG_HOVER = 0x02,
- UNIT_BYTE1_FLAG_UNK_3 = 0x04,
- UNIT_BYTE1_FLAG_ALL = 0xFF
+ 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
+ Hover = 2, // plays flying tier animations or falls back to ground tier animations, automatically enables hover clientside when entering visibility with this value
+ Fly = 3, // plays flying tier animations
+ Submerged = 4
};
// low byte (0 from 0..3) of UNIT_FIELD_BYTES_2
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 1dc1a102499..5299421c0a0 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -677,7 +677,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos)
Movement::MoveSplineInit init(_owner);
init.MoveTo(PositionToVector3(pos), false);
- init.SetAnimation(Movement::ToGround);
+ init.SetAnimation(AnimationTier::Ground);
Add(new GenericMovementGenerator(std::move(init), EFFECT_MOTION_TYPE, id));
}
@@ -687,7 +687,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos)
Movement::MoveSplineInit init(_owner);
init.MoveTo(PositionToVector3(pos));
- init.SetAnimation(Movement::ToFly);
+ init.SetAnimation(AnimationTier::Hover);
Add(new GenericMovementGenerator(std::move(init), EFFECT_MOTION_TYPE, id));
}
@@ -829,7 +829,7 @@ void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool
{
init.SetFly();
init.SetCyclic();
- init.SetAnimation(Movement::ToFly);
+ init.SetAnimation(AnimationTier::Hover);
}
else
{
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index 7e5592da4a0..4f2f7b3133d 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(Movement::ToGround);
+ init.SetAnimation(AnimationTier::Ground);
break;
case WAYPOINT_MOVE_TYPE_TAKEOFF:
- init.SetAnimation(Movement::ToFly);
+ init.SetAnimation(AnimationTier::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 a21c7bc7cfa..04dbc4e5c33 100644
--- a/src/server/game/Movement/Spline/MoveSpline.h
+++ b/src/server/game/Movement/Spline/MoveSpline.h
@@ -22,6 +22,8 @@
#include "MoveSplineInitArgs.h"
#include <G3D/Vector3.h>
+enum class AnimationTier : uint8;
+
namespace Movement
{
struct Location : public Vector3
@@ -123,6 +125,9 @@ namespace Movement
Vector3 CurrentDestination() const { return Initialized() ? spline.getPoint(point_Idx + 1) : Vector3(); }
int32 currentPathIdx() const;
+ bool HasAnimation() const { return splineflags.animation; }
+ AnimationTier GetAnimation() const { return static_cast<AnimationTier>(splineflags.animId); }
+
bool onTransport;
std::string ToString() const;
bool HasStarted() const
diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h
index 199baf53ea3..e385e792d90 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 AnimType enum, used with Animation flag
+ // animation ids stored here, see AnimationTier 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 4cf84e2609a..31a4dac19a0 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.h
+++ b/src/server/game/Movement/Spline/MoveSplineInit.h
@@ -22,15 +22,10 @@
class Unit;
+enum class AnimationTier : uint8;
+
namespace Movement
{
- enum AnimType
- {
- ToGround = 0, // 460 = ToGround, index of AnimationData.dbc
- FlyToFly = 1, // 461 = FlyToFly?
- ToFly = 2, // 458 = ToFly
- FlyToGround = 3 // 463 = FlyToGround
- };
// Transforms coordinates from global to transport offsets
class TC_GAME_API TransportPathTransform
@@ -75,7 +70,7 @@ namespace Movement
/* Plays animation after movement done
* can't be combined with parabolic movement
*/
- void SetAnimation(AnimType anim);
+ void SetAnimation(AnimationTier anim);
/* Adds final facing animation
* sets unit's facing to specified point/angle after all path done
@@ -166,7 +161,7 @@ namespace Movement
args.flags.EnableParabolic();
}
- inline void MoveSplineInit::SetAnimation(AnimType anim)
+ inline void MoveSplineInit::SetAnimation(AnimationTier anim)
{
args.time_perc = 0.f;
args.flags.EnableAnimation((uint8)anim);
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
index 448dcd05bbe..6e54f90f5b7 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
@@ -211,7 +211,7 @@ public:
switch (pointId)
{
case POINT_INTRO_START:
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_STAND_STATE, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
events.ScheduleEvent(EVENT_START_INTRO_PATH, Milliseconds(1));
break;
case POINT_INTRO_END:
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
index 3bb0afa5a6e..2027d4d4847 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
@@ -230,7 +230,6 @@ public:
case 9:
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
if (Creature* trigger = ObjectAccessor::GetCreature(*me, triggerGUID))
Unit::Kill(me, trigger);
me->SetReactState(REACT_AGGRESSIVE);
@@ -248,7 +247,6 @@ public:
case 10:
me->SetCanFly(true);
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetFacingTo(me->GetOrientation() + float(M_PI));
if (Creature * trigger = me->SummonCreature(NPC_TRIGGER, MiddleRoomLocation, TEMPSUMMON_CORPSE_DESPAWN))
triggerGUID = trigger->GetGUID();
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 415f5ee849a..abbec4bd449 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -246,7 +246,7 @@ struct boss_jedoga_shadowseeker : public BossAI
if (++_initiatesKilled == TWILIGHT_INITIATES_SIZE)
{
DoCastSelf(SPELL_HOVER_FALL_1);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
+ me->SetAnimationTier(AnimationTier::Ground);
events.ScheduleEvent(EVENT_START_FIGHT_1, Seconds(1));
}
}
@@ -318,7 +318,6 @@ struct boss_jedoga_shadowseeker : public BossAI
case EVENT_START_FIGHT_2:
summons.DespawnEntry(NPC_JEDOGA_CONTROLLER);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->GetMotionMaster()->MoveLand(POINT_GROUND, JedogaGroundPosition);
break;
case EVENT_START_PHASE_TWO:
@@ -330,7 +329,6 @@ struct boss_jedoga_shadowseeker : public BossAI
break;
case EVENT_FLY_DELAY:
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->GetMotionMaster()->MoveTakeoff(POINT_PHASE_TWO_FLY, JedogaFlyPosition);
break;
case EVENT_CHOOSE_VOLUNTEER:
@@ -364,7 +362,6 @@ struct boss_jedoga_shadowseeker : public BossAI
summons.DespawnEntry(NPC_JEDOGA_CONTROLLER);
DoCastSelf(SPELL_HOVER_FALL_2);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->GetMotionMaster()->MoveLand(POINT_GROUND, JedogaGroundPosition);
break;
case EVENT_CYCLONE_STRIKE:
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
index 131b77fea34..1b4e4546958 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
@@ -119,7 +119,6 @@ class boss_saviana_ragefire : public CreatureScript
case POINT_LAND_GROUND:
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_AGGRESSIVE);
events.ScheduleEvent(EVENT_ENRAGE, Seconds(1), EVENT_GROUP_LAND_PHASE);
events.ScheduleEvent(EVENT_FLAME_BREATH, Seconds(2), Seconds(4), EVENT_GROUP_LAND_PHASE);
@@ -162,7 +161,6 @@ class boss_saviana_ragefire : public CreatureScript
{
me->SetCanFly(true);
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
Position pos;
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 2625c40e363..edd4396c7ab 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
@@ -215,7 +215,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
if (Creature* minchar = me->FindNearestCreature(NPC_INFILTRATOR_MINCHAR_BQ, 200.0f))
{
minchar->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
- minchar->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND);
+ minchar->SetAnimationTier(AnimationTier::Ground);
minchar->SetCanFly(false);
minchar->RemoveAllAuras();
minchar->GetMotionMaster()->MoveCharge(4629.3711f, 2782.6089f, 401.5301f, SPEED_CHARGE / 3.0f);
@@ -247,7 +247,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
else
{
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND);
me->GetMotionMaster()->MovePoint(POINT_MINCHAR, mincharPos);
}
}
@@ -262,7 +261,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
{
_killMinchar = false;
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND);
me->GetMotionMaster()->MovePoint(POINT_MINCHAR, mincharPos);
}
else
@@ -276,7 +274,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
void JustReachedHome() override
{
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND);
me->SetReactState(REACT_AGGRESSIVE);
_JustReachedHome();
Talk(SAY_WIPE);
@@ -326,7 +323,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
break;
case POINT_GROUND:
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND);
me->SetReactState(REACT_AGGRESSIVE);
if (Unit* victim = me->SelectVictim())
AttackStart(victim);
@@ -408,7 +404,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
break;
}
case EVENT_DELIRIOUS_SLASH:
- if (_offtankGUID && !me->HasByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER))
+ if (_offtankGUID && me->GetAnimationTier() != AnimationTier::Fly)
if (Player* _offtank = ObjectAccessor::GetPlayer(*me, _offtankGUID))
DoCast(_offtank, SPELL_DELIRIOUS_SLASH);
events.ScheduleEvent(EVENT_DELIRIOUS_SLASH, 20s, 24s, EVENT_GROUP_NORMAL);
@@ -456,7 +452,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
break;
case EVENT_AIR_START_FLYING:
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND);
me->GetMotionMaster()->MovePoint(POINT_AIR, airPos);
break;
case EVENT_AIR_FLY_DOWN:
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index b594159c2a6..423a973d7da 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -297,7 +297,6 @@ struct boss_sindragosa : public BossAI
instance->SetBossState(DATA_SINDRAGOSA, FAIL);
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_DEFENSIVE);
}
@@ -323,7 +322,6 @@ struct boss_sindragosa : public BossAI
me->SetFarVisible(true);
me->SetCanFly(true);
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetSpeedRate(MOVE_FLIGHT, 4.0f);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Milliseconds moveTime = Milliseconds(uint64(me->GetExactDist(&SindragosaFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f)));
@@ -358,7 +356,6 @@ struct boss_sindragosa : public BossAI
me->SetFarVisible(false);
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetHomePosition(SindragosaLandPos);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetSpeedRate(MOVE_FLIGHT, 2.5f);
@@ -390,7 +387,6 @@ struct boss_sindragosa : public BossAI
{
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_DEFENSIVE);
_isInAirPhase = false;
@@ -498,7 +494,6 @@ struct boss_sindragosa : public BossAI
Talk(SAY_AIR_PHASE);
me->SetCanFly(true);
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
Position pos;
@@ -719,7 +714,6 @@ struct npc_spinestalker : public ScriptedAI
me->SetFarVisible(false);
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetHomePosition(SpinestalkerLandPos);
me->SetFacingTo(SpinestalkerLandPos.GetOrientation());
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -847,7 +841,6 @@ struct npc_rimefang_icc : public ScriptedAI
me->SetFarVisible(false);
me->SetCanFly(false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetHomePosition(RimefangLandPos);
me->SetFacingTo(RimefangLandPos.GetOrientation());
me->SetImmuneToPC(false);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index 94f13286b2e..9a586cd2ba8 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -550,7 +550,6 @@ struct boss_the_lich_king : public BossAI
_JustDied();
DoCastAOE(SPELL_PLAY_MOVIE, false);
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->GetMotionMaster()->MoveFall();
if (Creature* frostmourne = me->FindNearestCreature(NPC_FROSTMOURNE_TRIGGER, 50.0f))
frostmourne->DespawnOrUnsummon();
@@ -1130,7 +1129,6 @@ struct boss_the_lich_king : public BossAI
sCreatureTextMgr->SendSound(me, SOUND_PAIN, CHAT_MSG_MONSTER_YELL, 0, TEXT_RANGE_NORMAL, TEAM_OTHER, false);
// set flight
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->GetMotionMaster()->MovePoint(POINT_LK_OUTRO_2, OutroFlying);
break;
case EVENT_OUTRO_TALK_7:
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 92276664805..b88a3a0d9ac 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -264,6 +264,11 @@ class instance_icecrown_citadel : public InstanceMapScript
case NPC_BLOOD_QUEEN_LANA_THEL:
BloodQueenLanaThelGUID = creature->GetGUID();
break;
+ case NPC_INFILTRATOR_MINCHAR_BQ:
+ // keep him in air
+ creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
+ creature->SetDisableGravity(true);
+ break;
case NPC_CROK_SCOURGEBANE:
CrokScourgebaneGUID = creature->GetGUID();
break;
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index f7e6d6cc0be..464a75aa936 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -374,7 +374,6 @@ public:
Initialize();
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetImmuneToAll(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// TO DO: find what in core is making boss slower than in retail (when correct speed data) or find missing movement flag update or forced spline change
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index 85f65288525..fe978184105 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -618,7 +618,6 @@ class boss_mimiron : public CreatureScript
{
if (Creature* aerial = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AERIAL_COMMAND_UNIT)))
{
- aerial->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, 0);
aerial->CastSpell(vx001, SPELL_MOUNT_VX_001);
aerial->CastSpell(aerial, SPELL_HALF_HEAL);
}
@@ -991,7 +990,7 @@ class boss_vx_001 : public CreatureScript
me->SetImmuneToPC(false);
me->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); // Remove emotestate.
- //me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); Blizzard handles hover animation like this it seems.
+ //me->SetHover(true); // Blizzard handles hover animation like this it seems.
DoCast(me, SPELL_HEAT_WAVE_AURA);
events.SetPhase(PHASE_VX_001);
@@ -1132,9 +1131,8 @@ class boss_aerial_command_unit : public CreatureScript
damage = me->GetHealth() - 1; // Let creature fall to 1 hp, but do not let it die or damage itself with SetHealth().
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
- me->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_HOVER | UNIT_BYTE1_FLAG_ALWAYS_STAND);
- me->SetHover(false);
me->SetDisableGravity(true);
+ me->SetAnimationTier(AnimationTier::Ground);
DoCastSelf(SPELL_VEHICLE_DAMAGED, true);
@@ -1168,7 +1166,6 @@ class boss_aerial_command_unit : public CreatureScript
events.ScheduleEvent(EVENT_SUMMON_FIRE_BOTS, 1s, 0, PHASE_AERIAL_COMMAND_UNIT);
[[fallthrough]];
case DO_START_AERIAL:
- me->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_HOVER);
me->SetDisableGravity(false);
me->SetHover(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index f867dff1f7b..ffd89337a14 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
@@ -312,7 +312,6 @@ struct boss_razorscale : public BossAI
_permaGround = false;
_flyCount = 0;
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
}
void Reset() override
@@ -362,7 +361,6 @@ struct boss_razorscale : public BossAI
summons.DoAction(ACTION_START_FIGHT, DummyEntryCheckPredicate());
events.ScheduleEvent(EVENT_BERSERK, 15min);
HandleMusic(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
}
void ScheduleAirPhaseEvents()
@@ -400,7 +398,6 @@ struct boss_razorscale : public BossAI
case ACTION_START_PERMA_GROUND:
{
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->RemoveAurasDueToSpell(SPELL_STUN_SELF);
Talk(EMOTE_PERMA_GROUND);
DoCastSelf(SPELL_WING_BUFFET);
@@ -432,7 +429,6 @@ struct boss_razorscale : public BossAI
break;
case POINT_RAZORSCALE_GROUND:
me->SetDisableGravity(false);
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
if (!_permaGround)
{
DoCastSelf(SPELL_STUN_SELF, true);
@@ -628,7 +624,6 @@ struct boss_razorscale : public BossAI
case EVENT_RESUME_AIR_PHASE:
{
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
events.SetPhase(PHASE_AIR);
me->SetReactState(REACT_PASSIVE);
Position pos = me->GetPosition();
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
index be75c108151..8d609abcf7c 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
@@ -283,7 +283,7 @@ class npc_enslaved_proto_drake : public CreatureScript
{
if (type == WAYPOINT_MOTION_TYPE && id == POINT_LAST)
{
- me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
+ me->SetAnimationTier(AnimationTier::Ground);
}
}
@@ -292,7 +292,7 @@ class npc_enslaved_proto_drake : public CreatureScript
if (type == TYPE_PROTODRAKE_AT && data == DATA_PROTODRAKE_MOVE && !_setData && me->GetDistance(protodrakeCheckPos) < 5.0f)
{
_setData = true;
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
+ me->SetAnimationTier(AnimationTier::Fly);
me->GetMotionMaster()->MovePath(PATH_PROTODRAKE, false);
}
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
index e14409d78c9..c4c96d2acf8 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
@@ -372,7 +372,6 @@ public:
me->SetFarVisible(true);
me->SetCanFly(true);
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
_scheduler.Schedule(Seconds(2), [this](TaskContext /*context*/)
{
diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
index 8186a4e2e79..dc9b5e79471 100644
--- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
@@ -442,7 +442,6 @@ public:
me->SetCanFly(true);
me->SetDisableGravity(true);
- me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->GetMotionMaster()->MoveTakeoff(POINT_MOVE_UP, pos);
}
}