diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-02-09 00:14:58 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-02-09 18:44:19 +0100 |
commit | 25cdc5d9801fb6ea38205da4b5c4decf63dff90c (patch) | |
tree | 3356d98389c5bf174a698dd2f7aabcede4c2dcdd /src/server/game/Maps/Map.h | |
parent | aa432db36df8a3ce5b2e42f5299ec261f2e4ff14 (diff) |
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
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rw-r--r-- | src/server/game/Maps/Map.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 46eede09948..13d48db0f9d 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -98,9 +98,10 @@ struct map_areaHeader uint16 gridArea; }; -#define MAP_HEIGHT_NO_HEIGHT 0x0001 -#define MAP_HEIGHT_AS_INT16 0x0002 -#define MAP_HEIGHT_AS_INT8 0x0004 +#define MAP_HEIGHT_NO_HEIGHT 0x0001 +#define MAP_HEIGHT_AS_INT16 0x0002 +#define MAP_HEIGHT_AS_INT8 0x0004 +#define MAP_HEIGHT_HAS_FLIGHT_BOUNDS 0x0008 struct map_heightHeader { @@ -166,6 +167,8 @@ class GridMap uint16* m_uint16_V8; uint8* m_uint8_V8; }; + float* _maxHeight; + float* _minHeight; // Height level data float _gridHeight; float _gridIntHeightMultiplier; @@ -206,6 +209,7 @@ public: uint16 getArea(float x, float y) const; inline float getHeight(float x, float y) const {return (this->*_gridGetHeight)(x, y);} + float getMinHeight(float x, float y) const; float getLiquidLevel(float x, float y) const; uint8 getTerrainType(float x, float y) const; ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0); @@ -326,6 +330,7 @@ class Map : public GridRefManager<NGridType> // some calls like isInWater should not use vmaps due to processor power // can return INVALID_HEIGHT if under z+2 z coord not found height float GetHeight(float x, float y, float z, bool checkVMap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const; + float GetMinHeight(float x, float y) const; ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = nullptr) const; |