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:
Shauren committed 2016-02-09 18:44:19 +01:00
1 parent aa432db36d
commit 25cdc5d980
9 files changed
+225 -41

No files matched your search

+18 -9
View File
@@ -21,15 +21,16 @@
#include "adt.h"
// Helper
int holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888};
int holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000};
int holetab_h[4] = { 0x1111, 0x2222, 0x4444, 0x8888 };
int holetab_v[4] = { 0x000F, 0x00F0, 0x0F00, 0xF000 };
u_map_fcc MHDRMagic = { {'R','D','H','M'} };
u_map_fcc MCINMagic = { {'N','I','C','M'} };
u_map_fcc MH2OMagic = { {'O','2','H','M'} };
u_map_fcc MCNKMagic = { {'K','N','C','M'} };
u_map_fcc MCVTMagic = { {'T','V','C','M'} };
u_map_fcc MCLQMagic = { {'Q','L','C','M'} };
u_map_fcc MHDRMagic = { { 'R','D','H','M' } };
u_map_fcc MCINMagic = { { 'N','I','C','M' } };
u_map_fcc MH2OMagic = { { 'O','2','H','M' } };
u_map_fcc MCNKMagic = { { 'K','N','C','M' } };
u_map_fcc MCVTMagic = { { 'T','V','C','M' } };
u_map_fcc MCLQMagic = { { 'Q','L','C','M' } };
u_map_fcc MFBOMagic = { { 'O','B','F','M' } };
bool isHole(int holes, int i, int j)
{
@@ -81,7 +82,7 @@ bool adt_MHDR::prepareLoadedData()
if (fcc != MHDRMagic.fcc)
return false;
if (size!=sizeof(adt_MHDR)-8)
if (size != sizeof(adt_MHDR) - 8)
return false;
// Check and prepare MCIN
@@ -92,6 +93,9 @@ bool adt_MHDR::prepareLoadedData()
if (offsMH2O && !getMH2O()->prepareLoadedData())
return false;
if (offsMFBO && flags & 1 && !getMFBO()->prepareLoadedData())
return false;
return true;
}
@@ -154,3 +158,8 @@ bool adt_MCLQ::prepareLoadedData()
return true;
}
bool adt_MFBO::prepareLoadedData()
{
return fcc == MFBOMagic.fcc;
}