Core/Movement: Corrected Animation Tier handling
Port From (https://github.com/TrinityCore/TrinityCore/commit/ee620856ad2918ae7ce91a37a980d9f2129a074a)
This commit is contained in:
@@ -358,10 +358,10 @@ namespace Game.Movement
|
||||
switch (waypoint.moveType)
|
||||
{
|
||||
case WaypointMoveType.Land:
|
||||
init.SetAnimation(AnimType.ToGround);
|
||||
init.SetAnimation(AnimTier.Ground);
|
||||
break;
|
||||
case WaypointMoveType.Takeoff:
|
||||
init.SetAnimation(AnimType.ToFly);
|
||||
init.SetAnimation(AnimTier.Hover);
|
||||
break;
|
||||
case WaypointMoveType.Run:
|
||||
init.SetWalk(false);
|
||||
|
||||
@@ -625,7 +625,7 @@ namespace Game.Movement
|
||||
{
|
||||
MoveSplineInit init = new(_owner);
|
||||
init.MoveTo(pos, false);
|
||||
init.SetAnimation(AnimType.ToGround);
|
||||
init.SetAnimation(AnimTier.Ground);
|
||||
Add(new GenericMovementGenerator(init, MovementGeneratorType.Effect, id));
|
||||
}
|
||||
|
||||
@@ -633,7 +633,7 @@ namespace Game.Movement
|
||||
{
|
||||
MoveSplineInit init = new(_owner);
|
||||
init.MoveTo(pos);
|
||||
init.SetAnimation(AnimType.ToFly);
|
||||
init.SetAnimation(AnimTier.Hover);
|
||||
|
||||
Add(new GenericMovementGenerator(init, MovementGeneratorType.Effect, id));
|
||||
}
|
||||
@@ -820,7 +820,7 @@ namespace Game.Movement
|
||||
{
|
||||
init.SetFly();
|
||||
init.SetCyclic();
|
||||
init.SetAnimation(AnimType.ToFly);
|
||||
init.SetAnimation(AnimTier.Hover);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -347,6 +347,8 @@ namespace Game.Movement
|
||||
public Vector3 FinalDestination() { return Initialized() ? spline.GetPoint(spline.Last()) : Vector3.Zero; }
|
||||
public Vector3 CurrentDestination() { return Initialized() ? spline.GetPoint(point_Idx + 1) : Vector3.Zero; }
|
||||
|
||||
public AnimTier? GetAnimation() { return anim_tier != null ? (AnimTier)anim_tier.AnimTier : null; }
|
||||
|
||||
#region Fields
|
||||
public MoveSplineInitArgs InitArgs;
|
||||
public Spline spline = new();
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace Game.Movement
|
||||
args.flags.EnableParabolic();
|
||||
}
|
||||
|
||||
public void SetAnimation(AnimType anim)
|
||||
public void SetAnimation(AnimTier anim)
|
||||
{
|
||||
args.time_perc = 0.0f;
|
||||
args.animTier = new();
|
||||
|
||||
Reference in New Issue
Block a user