mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 05:11:55 +01:00
Core/Maps: Use DBC value to determine the maximum depth that a player can reach in an area before being teleported back up.
This commit is contained in:
@@ -397,8 +397,10 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
|
||||
if (plrMover) // nothing is charmed, or player charmed
|
||||
{
|
||||
plrMover->UpdateFallInformationIfNeed(movementInfo, opcode);
|
||||
|
||||
if (movementInfo.pos.GetPositionZ() < -500.0f)
|
||||
|
||||
AreaTableEntry const* zone = GetAreaEntryByAreaID(plrMover->GetAreaId());
|
||||
float depth = zone ? zone->MaxDepth : -500.0f;
|
||||
if (movementInfo.pos.GetPositionZ() < depth)
|
||||
{
|
||||
if (!(plrMover->GetBattleground() && plrMover->GetBattleground()->HandlePlayerUnderMap(_player)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user