Core/Movement: Add a debug log when a player falls below the map

Port From (https://github.com/TrinityCore/TrinityCore/commit/362a1c32c2cb61c972bb0a1163302e81b465dd4b)
This commit is contained in:
hondacrx
2022-05-24 13:25:44 -04:00
parent 025392b50a
commit bae70ca8ab
+1
View File
@@ -190,6 +190,7 @@ namespace Game
// @todo discard movement packets after the player is rooted
if (plrMover.IsAlive())
{
Log.outDebug(LogFilter.Player, $"FALLDAMAGE Below map. Map min height: {plrMover.GetMap().GetMinHeight(plrMover.GetPhaseShift(), movementInfo.Pos.GetPositionX(), movementInfo.Pos.GetPositionY())}, Player debug info:\n{plrMover.GetDebugInfo()}");
plrMover.AddPlayerFlag(PlayerFlags.IsOutOfBounds);
plrMover.EnvironmentalDamage(EnviromentalDamage.FallToVoid, (uint)GetPlayer().GetMaxHealth());
// player can be alive if GM/etc