Core/Movement: Corrected Animation Tier handling

Port From (https://github.com/TrinityCore/TrinityCore/commit/ee620856ad2918ae7ce91a37a980d9f2129a074a)
This commit is contained in:
hondacrx
2022-05-03 13:29:52 -04:00
parent c921160078
commit 42046011e7
11 changed files with 54 additions and 34 deletions
@@ -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);
+3 -3
View File
@@ -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
{
+2
View File
@@ -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();
+1 -1
View File
@@ -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();