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
@@ -4682,6 +4682,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
|
||||
// remove death flag + set aura
|
||||
SetByteValue(UNIT_FIELD_BYTES_1, 3, 0x00);
|
||||
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
|
||||
|
||||
// This must be called always even on Players with race != RACE_NIGHTELF in case of faction change
|
||||
RemoveAurasDueToSpell(20584); // RACE_NIGHTELF speed bonuses
|
||||
@@ -5105,7 +5106,7 @@ void Player::RepopAtGraveyard()
|
||||
AreaTableEntry const* zone = sAreaTableStore.LookupEntry(GetAreaId());
|
||||
|
||||
// Such zones are considered unreachable as a ghost and the player must be automatically revived
|
||||
if ((!IsAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < -500.0f)
|
||||
if ((!IsAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY()))
|
||||
{
|
||||
ResurrectPlayer(0.5f);
|
||||
SpawnCorpseBones();
|
||||
@@ -5142,8 +5143,10 @@ void Player::RepopAtGraveyard()
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
}
|
||||
else if (GetPositionZ() < -500.0f)
|
||||
else if (GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY()))
|
||||
TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation());
|
||||
|
||||
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
|
||||
}
|
||||
|
||||
bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone)
|
||||
|
||||
Reference in new issue
Block a user