Core/Units: Only update height in SetHover if unit is bellow HoverHeight

Port From (https://github.com/TrinityCore/TrinityCore/commit/10c915dd34ee94b267b92eef49cd0ecd22d643bf)
This commit is contained in:
hondacrx
2021-11-23 22:46:44 -05:00
parent b509aac0cd
commit 195fe6316e
+1 -1
View File
@@ -1020,7 +1020,7 @@ namespace Game.Entities
{
//! No need to check height on ascent
AddUnitMovementFlag(MovementFlag.Hover);
if (hoverHeight != 0)
if (hoverHeight != 0 && GetPositionZ() - GetFloorZ() < hoverHeight)
UpdateHeight(GetPositionZ() + hoverHeight);
}
else