Core/Creatures: Remove hover on death

Port From (https://github.com/TrinityCore/TrinityCore/commit/a91edcb9524b53f027a8ef8c247a443a9bb42f1e)
This commit is contained in:
hondacrx
2021-08-24 12:27:36 -04:00
parent e4240fcd94
commit 8636712938
4 changed files with 18 additions and 12 deletions
+3 -1
View File
@@ -989,7 +989,9 @@ namespace Game.Entities
else
{
RemoveUnitMovementFlag(MovementFlag.Hover);
if (hoverHeight != 0)
//! Dying creatures will MoveFall from setDeathState
if (hoverHeight != 0 && (!IsDying() || !IsUnit()))
{
float newZ = GetPositionZ() - hoverHeight;
UpdateAllowedPositionZ(GetPositionX(), GetPositionY(), ref newZ);