fix(Core/Unit): Introduce animtier to malygos to fix flying animations (#24067)

This commit is contained in:
killerwife
2025-12-10 05:09:21 +01:00
committed by GitHub
parent a54d1845e5
commit b73028f6f5
9 changed files with 49 additions and 36 deletions

View File

@@ -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);