summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/sql/updates/db_world/2025_12_10_01.sql3
-rw-r--r--data/sql/updates/db_world/2025_12_11_00.sql3
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp9
-rw-r--r--src/server/game/Conditions/DisableMgr.cpp51
-rw-r--r--src/server/game/DungeonFinding/LFG.h8
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp20
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.h4
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp7
-rw-r--r--src/server/game/Entities/Unit/Unit.h2
-rw-r--r--src/server/game/Movement/MotionMaster.cpp14
-rw-r--r--src/server/game/Movement/MotionMaster.h16
-rw-r--r--src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp6
-rw-r--r--src/server/game/Movement/MovementGenerators/PointMovementGenerator.h6
-rw-r--r--src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp4
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.h12
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp18
16 files changed, 112 insertions, 71 deletions
diff --git a/data/sql/updates/db_world/2025_12_10_01.sql b/data/sql/updates/db_world/2025_12_10_01.sql
new file mode 100644
index 0000000000..5ad78a965b
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_10_01.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_12_10_00 -> 2025_12_10_01
+--
+UPDATE `spell_proc_event` SET `procPhase`=2 WHERE `entry`=-19184;
diff --git a/data/sql/updates/db_world/2025_12_11_00.sql b/data/sql/updates/db_world/2025_12_11_00.sql
new file mode 100644
index 0000000000..8a9ceb7d01
--- /dev/null
+++ b/data/sql/updates/db_world/2025_12_11_00.sql
@@ -0,0 +1,3 @@
+-- DB update 2025_12_10_01 -> 2025_12_11_00
+
+UPDATE `quest_template_addon` SET `SpecialFlags` = `SpecialFlags` | 1 WHERE `ID` IN (12618, 12656);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 2f66b4ac11..2d18bd7503 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -4500,14 +4500,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if (!IsInPhase(e.event.eventPhaseChange.phasemask))
return;
- WorldObject* templastInvoker = GetLastInvoker();
- if (!templastInvoker)
- return;
-
- if (!IsUnit(templastInvoker))
- return;
-
- ProcessAction(e, templastInvoker->ToUnit());
+ ProcessAction(e);
break;
}
case SMART_EVENT_GAME_EVENT_START:
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp
index 234ddfe5a2..c02c7c6819 100644
--- a/src/server/game/Conditions/DisableMgr.cpp
+++ b/src/server/game/Conditions/DisableMgr.cpp
@@ -388,30 +388,39 @@ bool DisableMgr::IsDisabledFor(DisableType type, uint32 entry, Unit const* unit,
}
case DISABLE_TYPE_MAP:
case DISABLE_TYPE_LFG_MAP:
- if (Player const* player = unit->ToPlayer())
+ {
+ MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
+ if (!mapEntry)
+ return false;
+
+ if (!mapEntry->IsDungeon())
+ return mapEntry->map_type == MAP_COMMON;
+
+ uint8 disabledModes = itr->second.flags;
+
+ Difficulty targetDifficulty;
+ if (unit && unit->IsPlayer())
+ targetDifficulty = unit->ToPlayer()->GetDifficulty(mapEntry->IsRaid());
+ else
+ targetDifficulty = Difficulty(flags);
+
+ GetDownscaledMapDifficultyData(entry, targetDifficulty);
+
+ switch (targetDifficulty)
{
- MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
- if (mapEntry->IsDungeon())
- {
- uint8 disabledModes = itr->second.flags;
- Difficulty targetDifficulty = player->GetDifficulty(mapEntry->IsRaid());
- GetDownscaledMapDifficultyData(entry, targetDifficulty);
- switch (targetDifficulty)
- {
- case DUNGEON_DIFFICULTY_NORMAL:
- return disabledModes & DUNGEON_STATUSFLAG_NORMAL;
- case DUNGEON_DIFFICULTY_HEROIC:
- return disabledModes & DUNGEON_STATUSFLAG_HEROIC;
- case RAID_DIFFICULTY_10MAN_HEROIC:
- return disabledModes & RAID_STATUSFLAG_10MAN_HEROIC;
- case RAID_DIFFICULTY_25MAN_HEROIC:
- return disabledModes & RAID_STATUSFLAG_25MAN_HEROIC;
- }
- }
- else if (mapEntry->map_type == MAP_COMMON)
- return true;
+ case DUNGEON_DIFFICULTY_NORMAL:
+ return disabledModes & DUNGEON_STATUSFLAG_NORMAL;
+ case DUNGEON_DIFFICULTY_HEROIC:
+ return disabledModes & DUNGEON_STATUSFLAG_HEROIC;
+ case RAID_DIFFICULTY_10MAN_HEROIC:
+ return disabledModes & RAID_STATUSFLAG_10MAN_HEROIC;
+ case RAID_DIFFICULTY_25MAN_HEROIC:
+ return disabledModes & RAID_STATUSFLAG_25MAN_HEROIC;
+ default:
+ return false;
}
return false;
+ }
case DISABLE_TYPE_VMAP:
return flags & itr->second.flags;
case DISABLE_TYPE_QUEST:
diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h
index 4ba61eefef..260f29f089 100644
--- a/src/server/game/DungeonFinding/LFG.h
+++ b/src/server/game/DungeonFinding/LFG.h
@@ -100,6 +100,14 @@ namespace lfg
LFG_ANSWER_AGREE = 1
};
+ enum LfgRandomDungeonIds : uint32
+ {
+ RANDOM_DUNGEON_NORMAL_TBC = 259,
+ RANDOM_DUNGEON_HEROIC_TBC = 260,
+ RANDOM_DUNGEON_NORMAL_WOTLK = 261,
+ RANDOM_DUNGEON_HEROIC_WOTLK = 262
+ };
+
class Lfg5Guids;
typedef std::list<Lfg5Guids> Lfg5GuidsList;
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 4b19fac35c..cd3bd64650 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -408,11 +408,10 @@ namespace lfg
DungeonProgressionRequirements const* ar = sObjectMgr->GetAccessRequirement(dungeon->map, Difficulty(dungeon->difficulty));
uint32 lockData = 0;
+
if (dungeon->expansion > expansion || (onlySeasonalBosses && !dungeon->seasonal))
lockData = LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION;
- else if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, player))
- lockData = LFG_LOCKSTATUS_RAID_LOCKED;
- else if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_LFG_MAP, dungeon->map, player))
+ else if (IsDungeonDisabled(dungeon->map, dungeon->difficulty))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
else if (dungeon->difficulty > DUNGEON_DIFFICULTY_NORMAL && (!mapEntry || !mapEntry->IsRaid()) && sInstanceSaveMgr->PlayerIsPermBoundToInstance(player->GetGUID(), dungeon->map, Difficulty(dungeon->difficulty)))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
@@ -1484,8 +1483,9 @@ namespace lfg
@param[in, out] dungeons Dungeons to check restrictions
@param[in] players Set of players to check their dungeon restrictions
@param[out] lockMap Map of players Lock status info of given dungeons (Empty if dungeons is not empty)
+ @param[in] randomDungeonId Random dungeon ID (0 for non-random selections), used to filter disabled maps
*/
- void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap, bool isRDF)
+ void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap, uint32 randomDungeonId)
{
lockMap.clear();
for (LfgGuidSet::const_iterator it = players.begin(); it != players.end() && !dungeons.empty(); ++it)
@@ -1496,7 +1496,11 @@ namespace lfg
{
uint32 dungeonId = (it2->first & 0x00FFFFFF); // Compare dungeon ids
- if (it2->second == LFG_LOCKSTATUS_RAID_LOCKED && isRDF && sWorld->getBoolConfig(CONFIG_LFG_ALLOW_COMPLETED))
+ LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId);
+
+ uint8 difficultyFlag = (randomDungeonId == RANDOM_DUNGEON_NORMAL_TBC || randomDungeonId == RANDOM_DUNGEON_NORMAL_WOTLK) ? 0 : 1;
+
+ if (dungeon && !IsDungeonDisabled(dungeon->map, (Difficulty)difficultyFlag) && it2->second == LFG_LOCKSTATUS_RAID_LOCKED && randomDungeonId && sWorld->getBoolConfig(CONFIG_LFG_ALLOW_COMPLETED))
continue;
LfgDungeonSet::iterator itDungeon = dungeons.find(dungeonId);
@@ -2820,4 +2824,10 @@ namespace lfg
return randomDungeons;
}
+ bool LFGMgr::IsDungeonDisabled(uint32 mapId, Difficulty difficulty) const
+ {
+ return sDisableMgr->IsDisabledFor(DISABLE_TYPE_MAP, mapId, nullptr, difficulty) ||
+ sDisableMgr->IsDisabledFor(DISABLE_TYPE_LFG_MAP, mapId, nullptr);
+ }
+
} // namespace lfg
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index e52bbda7dd..c96ae4f2a4 100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -518,6 +518,8 @@ namespace lfg
LfgUpdateData GetLfgStatus(ObjectGuid guid);
/// Checks if Seasonal dungeon is active
bool IsSeasonActive(uint32 dungeonId);
+ /// Checks if given dungeon map is disabled
+ bool IsDungeonDisabled(uint32 mapId, Difficulty difficulty) const;
/// Gets the random dungeon reward corresponding to given dungeon and player level
LfgReward const* GetRandomDungeonReward(uint32 dungeon, uint8 level);
/// Returns all random and seasonal dungeons for given level and expansion
@@ -589,7 +591,7 @@ namespace lfg
void DecreaseKicksLeft(ObjectGuid guid);
void SetState(ObjectGuid guid, LfgState state);
void SetCanOverrideRBState(ObjectGuid guid, bool val);
- void GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap, bool isRDF = false);
+ void GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap, uint32 randomDungeonId = 0);
void _SaveToDB(ObjectGuid guid);
LFGDungeonData const* GetLFGDungeon(uint32 id);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 623886eb78..9f0023450e 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -596,7 +596,7 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
DisableSpline();
if (movespline->HasAnimation() && IsCreature() && IsAlive())
- SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, movespline->GetAnimationType());
+ SetAnimTier(AnimTier(movespline->GetAnimationType()));
}
// pussywizard: update always! not every 400ms, because movement generators need the actual position
@@ -15284,6 +15284,11 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell
return spellInfo->GetMinRange(!IsHostileTo(target));
}
+void Unit::SetAnimTier(AnimTier animTier)
+{
+ SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, uint8(animTier));
+}
+
uint32 Unit::GetCreatureType() const
{
if (IsPlayer())
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 934bb1c70c..1590c2721f 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -774,6 +774,8 @@ public:
inline bool IsCrowdControlled() const { return HasFlag(UNIT_FIELD_FLAGS, (UNIT_FLAG_CONFUSED | UNIT_FLAG_FLEEING | UNIT_FLAG_STUNNED)); }
inline bool IsImmobilizedState() const { return HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); }
+ void SetAnimTier(AnimTier animTier);
+
/*********************************************************/
/*** UNIT TYPES, CLASSES, RACES... ***/
/*********************************************************/
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index bf4df28aad..8e4f91c16c 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -471,7 +471,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo
*
* For transition movement between the ground and the air, use MoveLand or MoveTakeoff instead.
*/
-void MotionMaster::MovePoint(uint32 id, float x, float y, float z, ForcedMovement forcedMovement, float speed, float orientation, bool generatePath, bool forceDestination, MovementSlot slot)
+void MotionMaster::MovePoint(uint32 id, float x, float y, float z, ForcedMovement forcedMovement, float speed, float orientation, bool generatePath, bool forceDestination, MovementSlot slot, std::optional<AnimTier> animTier)
{
if (_owner->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
return;
@@ -479,12 +479,12 @@ void MotionMaster::MovePoint(uint32 id, float x, float y, float z, ForcedMovemen
if (_owner->IsPlayer())
{
LOG_DEBUG("movement.motionmaster", "Player ({}) targeted point (Id: {} X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), id, x, y, z);
- Mutate(new PointMovementGenerator<Player>(id, x, y, z, forcedMovement, speed, orientation, nullptr, generatePath, forceDestination), slot);
+ Mutate(new PointMovementGenerator<Player>(id, x, y, z, forcedMovement, speed, orientation, nullptr, generatePath, forceDestination, animTier), slot);
}
else
{
LOG_DEBUG("movement.motionmaster", "Creature ({}) targeted point (ID: {} X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), id, x, y, z);
- Mutate(new PointMovementGenerator<Creature>(id, x, y, z, forcedMovement, speed, orientation, nullptr, generatePath, forceDestination), slot);
+ Mutate(new PointMovementGenerator<Creature>(id, x, y, z, forcedMovement, speed, orientation, nullptr, generatePath, forceDestination, animTier), slot);
}
}
@@ -556,7 +556,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos, float speed /* = 0.0
init.SetVelocity(speed);
}
- init.SetAnimation(Movement::ToGround);
+ init.SetAnimation(AnimTier::Ground);
Mutate(new EffectMovementGenerator(init, id), MOTION_SLOT_ACTIVE);
}
@@ -590,7 +590,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed /* =
init.SetVelocity(speed);
if (!skipAnimation)
- init.SetAnimation(Movement::ToFly);
+ init.SetAnimation(AnimTier::Hover);
Mutate(new EffectMovementGenerator(init, id), MOTION_SLOT_ACTIVE);
}
@@ -727,12 +727,12 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id,
if (_owner->IsPlayer())
{
LOG_DEBUG("movement.motionmaster", "Player ({}) charge point (X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), x, y, z);
- Mutate(new PointMovementGenerator<Player>(id, x, y, z, FORCED_MOVEMENT_NONE, speed, orientation, path, generatePath, generatePath, targetGUID), MOTION_SLOT_CONTROLLED);
+ Mutate(new PointMovementGenerator<Player>(id, x, y, z, FORCED_MOVEMENT_NONE, speed, orientation, path, generatePath, generatePath, std::nullopt, targetGUID), MOTION_SLOT_CONTROLLED);
}
else
{
LOG_DEBUG("movement.motionmaster", "Creature ({}) charge point (X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), x, y, z);
- Mutate(new PointMovementGenerator<Creature>(id, x, y, z, FORCED_MOVEMENT_NONE, speed, orientation, path, generatePath, generatePath, targetGUID), MOTION_SLOT_CONTROLLED);
+ Mutate(new PointMovementGenerator<Creature>(id, x, y, z, FORCED_MOVEMENT_NONE, speed, orientation, path, generatePath, generatePath, std::nullopt, targetGUID), MOTION_SLOT_CONTROLLED);
}
}
diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h
index 637e43a91b..4ac140260f 100644
--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -95,6 +95,16 @@ enum class PathSource
SMART_WAYPOINT_MGR = 1,
};
+enum class AnimTier : uint8
+{
+ Ground = 0,
+ Swim = 1,
+ Hover = 2,
+ Fly = 3,
+ Submerged = 4,
+ Max
+};
+
struct ChaseRange
{
ChaseRange(float range);
@@ -225,9 +235,9 @@ public:
void MoveForwards(Unit* target, float dist);
void MoveConfused();
void MoveFleeing(Unit* enemy, uint32 time = 0);
- void MovePoint(uint32 id, const Position& pos, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, float speed = 0.f, bool generatePath = true, bool forceDestination = true)
- { MovePoint(id, pos.m_positionX, pos.m_positionY, pos.m_positionZ, forcedMovement, speed, pos.GetOrientation(), generatePath, forceDestination, MOTION_SLOT_ACTIVE); }
- void MovePoint(uint32 id, float x, float y, float z, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, float speed = 0.f, float orientation = 0.0f, bool generatePath = true, bool forceDestination = true, MovementSlot slot = MOTION_SLOT_ACTIVE);
+ void MovePoint(uint32 id, const Position& pos, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, float speed = 0.f, bool generatePath = true, bool forceDestination = true, std::optional<AnimTier> animTier = std::nullopt)
+ { MovePoint(id, pos.m_positionX, pos.m_positionY, pos.m_positionZ, forcedMovement, speed, pos.GetOrientation(), generatePath, forceDestination, MOTION_SLOT_ACTIVE, animTier); }
+ void MovePoint(uint32 id, float x, float y, float z, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, float speed = 0.f, float orientation = 0.0f, bool generatePath = true, bool forceDestination = true, MovementSlot slot = MOTION_SLOT_ACTIVE, std::optional<AnimTier> animTier = std::nullopt);
void MoveSplinePath(Movement::PointsArray* path, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE);
void MovePath(uint32 path_id, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, PathSource pathSource = PathSource::WAYPOINT_MGR);
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
index 95e3c5621f..66ba79be59 100644
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
@@ -94,6 +94,9 @@ void PointMovementGenerator<T>::DoInitialize(T* unit)
init.SetFacing(i_orientation);
}
+ if (_animTier)
+ init.SetAnimation(*_animTier);
+
init.Launch();
}
@@ -152,6 +155,9 @@ bool PointMovementGenerator<T>::DoUpdate(T* unit, uint32 /*diff*/)
else if (_forcedMovement == FORCED_MOVEMENT_RUN)
init.SetWalk(false);
+ if (_animTier)
+ init.SetAnimation(*_animTier);
+
if (i_orientation > 0.0f)
{
init.SetFacing(i_orientation);
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
index 6dc16eb4eb..b4b782bfd1 100644
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
@@ -21,15 +21,16 @@
#include "Creature.h"
#include "MovementGenerator.h"
#include "MoveSplineInit.h"
+#include <optional>
template<class T>
class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementGenerator<T> >
{
public:
PointMovementGenerator(uint32 _id, float _x, float _y, float _z, ForcedMovement forcedMovement, float _speed = 0.0f, float orientation = 0.0f, const Movement::PointsArray* _path = nullptr,
- bool generatePath = false, bool forceDestination = false, ObjectGuid chargeTargetGUID = ObjectGuid::Empty, bool reverseOrientation = false, ObjectGuid facingTargetGuid = ObjectGuid())
+ bool generatePath = false, bool forceDestination = false, std::optional<AnimTier> animTier = std::nullopt, ObjectGuid chargeTargetGUID = ObjectGuid::Empty, bool reverseOrientation = false, ObjectGuid facingTargetGuid = ObjectGuid())
: id(_id), i_x(_x), i_y(_y), i_z(_z), speed(_speed), i_orientation(orientation), _generatePath(generatePath), _forceDestination(forceDestination), _reverseOrientation(reverseOrientation),
- _chargeTargetGUID(chargeTargetGUID), _forcedMovement(forcedMovement), _facingTargetGuid(facingTargetGuid)
+ _chargeTargetGUID(chargeTargetGUID), _forcedMovement(forcedMovement), _facingTargetGuid(facingTargetGuid), _animTier(animTier)
{
if (_path)
m_precomputedPath = *_path;
@@ -60,6 +61,7 @@ private:
ObjectGuid _chargeTargetGUID;
ForcedMovement _forcedMovement;
ObjectGuid _facingTargetGuid;
+ std::optional<AnimTier> _animTier;
};
class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index c113f69764..7c13fb982e 100644
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -204,10 +204,10 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
switch (node.move_type)
{
case WAYPOINT_MOVE_TYPE_LAND:
- init.SetAnimation(Movement::ToGround);
+ init.SetAnimation(AnimTier::Ground);
break;
case WAYPOINT_MOVE_TYPE_TAKEOFF:
- init.SetAnimation(Movement::ToFly);
+ init.SetAnimation(AnimTier::Hover);
break;
case WAYPOINT_MOVE_TYPE_RUN:
init.SetWalk(false);
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h
index 5be1ebe26b..e0761129c9 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.h
+++ b/src/server/game/Movement/Spline/MoveSplineInit.h
@@ -29,14 +29,6 @@ namespace Movement
// xinef: moved declaration here so it can be accessed out of MoveSplineInit.cpp
UnitMoveType SelectSpeedType(uint32 moveFlags);
- 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 TransportPathTransform
{
@@ -89,7 +81,7 @@ namespace Movement
/* Plays animation after movement done
* can't be combined with parabolic movement
*/
- void SetAnimation(AnimType anim);
+ void SetAnimation(AnimTier anim);
/* Adds final facing animation
* sets unit's facing to specified point/angle after all path done
@@ -191,7 +183,7 @@ namespace Movement
args.flags.EnableParabolic();
}
- inline void MoveSplineInit::SetAnimation(AnimType anim)
+ inline void MoveSplineInit::SetAnimation(AnimTier anim)
{
args.time_perc = 0.f;
args.flags.EnableAnimation((uint8)anim);
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 3d77b31d5e..bdf1ba1187 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -234,6 +234,8 @@ public:
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PACIFIED);
me->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE);
+ me->SetAnimTier(AnimTier::Fly);
+
if (pInstance)
{
pInstance->SetData(DATA_ENCOUNTER_STATUS, NOT_STARTED);
@@ -277,12 +279,6 @@ public:
case MI_POINT_SURGE_OF_POWER_CENTER:
events.RescheduleEvent(EVENT_SURGE_OF_POWER_WARNING, 0ms, 1);
break;
- }
- }
- else if (type == EFFECT_MOTION_TYPE)
- {
- switch (id)
- {
case MI_POINT_INTRO_LAND:
me->SetDisableGravity(false);
events.RescheduleEvent(EVENT_START_FIGHT, 0ms, 1);
@@ -401,7 +397,7 @@ public:
}
case EVENT_INTRO_LAND:
{
- me->GetMotionMaster()->MoveLand(MI_POINT_INTRO_LAND, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), 7.0f);
+ me->GetMotionMaster()->MovePoint(MI_POINT_INTRO_LAND, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), FORCED_MOVEMENT_RUN, 0.f, 0.f, true, true, MOTION_SLOT_ACTIVE, AnimTier::Ground);
break;
}
case EVENT_START_FIGHT:
@@ -462,7 +458,7 @@ public:
me->GetMotionMaster()->MoveIdle();
me->StopMoving();
me->SetDisableGravity(true);
- me->GetMotionMaster()->MoveTakeoff(MI_POINT_VORTEX_TAKEOFF, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ() + 20.0f, 7.0f);
+ me->GetMotionMaster()->MovePoint(MI_POINT_VORTEX_TAKEOFF, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ() + 20.0f, FORCED_MOVEMENT_RUN, 0.f, 0.f, true, true, MOTION_SLOT_ACTIVE, AnimTier::Fly);
events.DelayEvents(25s, 1); // don't delay berserk (group 0)
}
@@ -539,7 +535,7 @@ public:
break;
}
case EVENT_VORTEX_LAND_0:
- me->GetMotionMaster()->MoveLand(MI_POINT_VORTEX_LAND, CenterPos, 7.0f);
+ me->GetMotionMaster()->MovePoint(MI_POINT_VORTEX_LAND, CenterPos, FORCED_MOVEMENT_RUN, 0.f, true, true, AnimTier::Ground);
break;
case EVENT_VORTEX_LAND_1:
@@ -573,7 +569,7 @@ public:
me->GetMotionMaster()->MoveIdle();
me->DisableSpline();
me->SetDisableGravity(true);
- me->GetMotionMaster()->MoveTakeoff(MI_POINT_CENTER_AIR_PH_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 32.0f, 7.0f);
+ me->GetMotionMaster()->MovePoint(MI_POINT_CENTER_AIR_PH_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 32.0f, FORCED_MOVEMENT_RUN, 0.f, 0.f, true, true, MOTION_SLOT_ACTIVE, AnimTier::Fly);
events.RescheduleEvent(EVENT_START_PHASE_2_MOVE_TO_SIDE, 22s + 500ms, 1);
break;
}
@@ -699,7 +695,7 @@ public:
case EVENT_MOVE_TO_PHASE_3_POSITION:
{
me->SendMeleeAttackStop(me->GetVictim());
- me->GetMotionMaster()->MoveTakeoff(MI_POINT_PH_3_FIGHT_POSITION, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ() - 5.0f, me->GetSpeed(MOVE_RUN));
+ me->GetMotionMaster()->MovePoint(MI_POINT_PH_3_FIGHT_POSITION, CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ() - 5.0f, FORCED_MOVEMENT_RUN, 0.f, 0.f, true, true, MOTION_SLOT_ACTIVE, AnimTier::Fly);
me->GetThreatMgr().ClearAllThreat(); // players on vehicle are unattackable -> leads to EnterEvadeMode() because target is not acceptable!