Core/Units: Calculate HoverHeight from model data

Port From (https://github.com/TrinityCore/TrinityCore/commit/d6133c78de9e2272765c2cfda82c440663acd254)
This commit is contained in:
hondacrx
2023-04-25 17:23:24 -04:00
parent 76dd846962
commit 1ba4f55eec
9 changed files with 53 additions and 32 deletions
@@ -1410,6 +1410,8 @@ namespace Game.Entities
SetUnitFlag(UnitFlags.Mount);
CalculateHoverHeight();
Player player = ToPlayer();
if (player != null)
{
@@ -1461,6 +1463,8 @@ namespace Game.Entities
if (thisPlayer != null)
thisPlayer.SendMovementSetCollisionHeight(thisPlayer.GetCollisionHeight(), UpdateCollisionHeightReason.Mount);
CalculateHoverHeight();
// dismount as a vehicle
if (IsTypeId(TypeId.Player) && GetVehicleKit() != null)
{