Core/Maps: Parse MFBO adt chunk to properly handle height where player counts as falling under the map
* This fixes the height at which player is instantly killed when falling from The Frozen Throne * Set PLAYER_FLAGS_IS_OUT_OF_BOUNDS on players under the map to enable release spirit button while still falling Note: Extracting new maps is required (cherry picked from commit 4f78efd4633f79285f176b61367a067b2cd90e2b) # Conflicts: # dep/PackageList.txt # src/server/game/DataStores/DBCStructure.h # src/server/game/Entities/Player/Player.cpp # src/server/game/Handlers/MovementHandler.cpp # src/tools/map_extractor/CMakeLists.txt # src/tools/map_extractor/System.cpp # src/tools/map_extractor/adt.h # src/tools/map_extractor/loadlib.cpp
This commit is contained in:
1 parent
aa432db36d
commit
25cdc5d980
9 files changed
+225
-41
No files matched your search
@@ -386,7 +386,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
|
||||
|
||||
plrMover->UpdateFallInformationIfNeed(movementInfo, opcode);
|
||||
|
||||
if (movementInfo.pos.GetPositionZ() < -500.0f)
|
||||
if (movementInfo.pos.GetPositionZ() < plrMover->GetMap()->GetMinHeight(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY()))
|
||||
{
|
||||
if (!(plrMover->GetBattleground() && plrMover->GetBattleground()->HandlePlayerUnderMap(_player)))
|
||||
{
|
||||
@@ -395,6 +395,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
|
||||
/// @todo discard movement packets after the player is rooted
|
||||
if (plrMover->IsAlive())
|
||||
{
|
||||
plrMover->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
|
||||
plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
|
||||
// player can be alive if GM/etc
|
||||
// change the death state to CORPSE to prevent the death timer from
|
||||
|
||||
Reference in new issue
Block a user