Core/Movement: Fixed creature hover

Port From (https://github.com/TrinityCore/TrinityCore/commit/2e2b29861878fda2d27156c71a1d8ed7dbe0b4fe)
This commit is contained in:
hondacrx
2021-08-24 11:10:59 -04:00
parent 1c5bb258d5
commit 89058fec83
9 changed files with 59 additions and 90 deletions
+3 -3
View File
@@ -286,7 +286,7 @@ namespace Game.Movement
{
// we are already close enough. We just need to turn toward the target without changing position.
MoveSplineInit init = new(_owner);
init.MoveTo(_owner.GetPositionX(), _owner.GetPositionY(), _owner.GetPositionZMinusOffset());
init.MoveTo(_owner.GetPositionX(), _owner.GetPositionY(), _owner.GetPositionZ());
init.SetFacing(target);
init.Launch();
StartMovement(new EffectMovementGenerator(id), MovementSlot.Active);
@@ -440,7 +440,7 @@ namespace Game.Movement
if (_owner.IsFlying())
point.Z = z;
else
point.Z = _owner.GetMapHeight(point.X, point.Y, z);
point.Z = _owner.GetMapHeight(point.X, point.Y, z) + _owner.GetHoverOffset();
init.args.path[i] = point;
}
@@ -536,7 +536,7 @@ namespace Game.Movement
}
MoveSplineInit init = new(_owner);
init.MoveTo(_owner.GetPositionX(), _owner.GetPositionY(), tz, false);
init.MoveTo(_owner.GetPositionX(), _owner.GetPositionY(), tz + _owner.GetHoverOffset(), false);
init.SetFall();
init.Launch();
StartMovement(new EffectMovementGenerator(id), MovementSlot.Controlled);