diff options
| author | Shauren <shauren.trinity@gmail.com> | 2016-02-09 00:14:58 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2016-02-09 00:14:58 +0100 |
| commit | 4f78efd4633f79285f176b61367a067b2cd90e2b (patch) | |
| tree | 252dff34f55f084d097aecea3d269882d6286b0d /src/server/game/Maps/Map.h | |
| parent | b9f1dffa14fbd340634b035e05e59063d0028bfa (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
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 bf8770cfd30..bf29a257419 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -100,9 +100,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 { @@ -168,6 +169,8 @@ class GridMap uint16* m_uint16_V8; uint8* m_uint8_V8; }; + float* _maxHeight; + float* _minHeight; // Height level data float _gridHeight; float _gridIntHeightMultiplier; @@ -208,6 +211,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); @@ -329,6 +333,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; |
