TrinityCore
MapDefines.h File Reference
#include "Define.h"
#include "EnumFlag.h"
#include "Optional.h"
#include <array>
+ Include dependency graph for MapDefines.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  map_fileheader
 
struct  map_areaHeader
 
struct  map_heightHeader
 
struct  map_liquidHeader
 
struct  LiquidData
 
struct  WmoLocation
 
struct  PositionFullTerrainStatus
 

Macros

#define MAP_LIQUID_STATUS_SWIMMING   (LIQUID_MAP_IN_WATER | LIQUID_MAP_UNDER_WATER)
 
#define MAP_LIQUID_STATUS_IN_CONTACT   (MAP_LIQUID_STATUS_SWIMMING | LIQUID_MAP_WATER_WALK)
 

Typedefs

using u_map_magic = std::array< char, 4 >
 Represents a map magic value of 4 bytes (used in versions) More...
 

Enumerations

enum class  map_areaHeaderFlags : uint16 { None = 0x0000 , NoArea = 0x0001 }
 
enum class  map_heightHeaderFlags : uint32 {
  None = 0x0000 , NoHeight = 0x0001 , HeightAsInt16 = 0x0002 , HeightAsInt8 = 0x0004 ,
  HasFlightBounds = 0x0008
}
 
enum class  map_liquidHeaderFlags : uint8 { None = 0x0000 , NoType = 0x0001 , NoHeight = 0x0002 }
 
enum class  map_liquidHeaderTypeFlags : uint8 {
  NoWater = 0x00 , Water = 0x01 , Ocean = 0x02 , Magma = 0x04 ,
  Slime = 0x08 , DarkWater = 0x10 , AllLiquids = Water | Ocean | Magma | Slime
}
 
enum  ZLiquidStatus : uint32 {
  LIQUID_MAP_NO_WATER = 0x00000000 , LIQUID_MAP_ABOVE_WATER = 0x00000001 , LIQUID_MAP_WATER_WALK = 0x00000002 , LIQUID_MAP_IN_WATER = 0x00000004 ,
  LIQUID_MAP_UNDER_WATER = 0x00000008 , LIQUID_MAP_OCEAN_FLOOR = 0x00000010
}
 

Functions

 DEFINE_ENUM_FLAG (map_areaHeaderFlags)
 
 DEFINE_ENUM_FLAG (map_heightHeaderFlags)
 
 DEFINE_ENUM_FLAG (map_liquidHeaderFlags)
 
 DEFINE_ENUM_FLAG (map_liquidHeaderTypeFlags)
 

Variables

TC_COMMON_API u_map_magic const MapMagic
 
TC_COMMON_API uint32 const MapVersionMagic
 
TC_COMMON_API u_map_magic const MapAreaMagic
 
TC_COMMON_API u_map_magic const MapHeightMagic
 
TC_COMMON_API u_map_magic const MapLiquidMagic
 

Macro Definition Documentation

◆ MAP_LIQUID_STATUS_IN_CONTACT

#define MAP_LIQUID_STATUS_IN_CONTACT   (MAP_LIQUID_STATUS_SWIMMING | LIQUID_MAP_WATER_WALK)

Definition at line 135 of file MapDefines.h.

◆ MAP_LIQUID_STATUS_SWIMMING

#define MAP_LIQUID_STATUS_SWIMMING   (LIQUID_MAP_IN_WATER | LIQUID_MAP_UNDER_WATER)

Definition at line 134 of file MapDefines.h.

Typedef Documentation

◆ u_map_magic

using u_map_magic = std::array<char, 4>

Represents a map magic value of 4 bytes (used in versions)

Definition at line 27 of file MapDefines.h.

Enumeration Type Documentation

◆ map_areaHeaderFlags

enum class map_areaHeaderFlags : uint16
strong
Enumerator
None 
NoArea 

Definition at line 53 of file MapDefines.h.

◆ map_heightHeaderFlags

enum class map_heightHeaderFlags : uint32
strong
Enumerator
None 
NoHeight 
HeightAsInt16 
HeightAsInt8 
HasFlightBounds 

Definition at line 68 of file MapDefines.h.

◆ map_liquidHeaderFlags

enum class map_liquidHeaderFlags : uint8
strong
Enumerator
None 
NoType 
NoHeight 

Definition at line 87 of file MapDefines.h.

◆ map_liquidHeaderTypeFlags

enum class map_liquidHeaderTypeFlags : uint8
strong
Enumerator
NoWater 
Water 
Ocean 
Magma 
Slime 
DarkWater 
AllLiquids 

Definition at line 96 of file MapDefines.h.

◆ ZLiquidStatus

Enumerator
LIQUID_MAP_NO_WATER 
LIQUID_MAP_ABOVE_WATER 
LIQUID_MAP_WATER_WALK 
LIQUID_MAP_IN_WATER 
LIQUID_MAP_UNDER_WATER 
LIQUID_MAP_OCEAN_FLOOR 

Definition at line 124 of file MapDefines.h.

Function Documentation

◆ DEFINE_ENUM_FLAG() [1/4]

DEFINE_ENUM_FLAG ( map_areaHeaderFlags  )

◆ DEFINE_ENUM_FLAG() [2/4]

DEFINE_ENUM_FLAG ( map_heightHeaderFlags  )

◆ DEFINE_ENUM_FLAG() [3/4]

DEFINE_ENUM_FLAG ( map_liquidHeaderFlags  )

◆ DEFINE_ENUM_FLAG() [4/4]

DEFINE_ENUM_FLAG ( map_liquidHeaderTypeFlags  )

Variable Documentation

◆ MapAreaMagic

TC_COMMON_API u_map_magic const MapAreaMagic
extern

Definition at line 22 of file MapDefines.cpp.

◆ MapHeightMagic

TC_COMMON_API u_map_magic const MapHeightMagic
extern

Definition at line 23 of file MapDefines.cpp.

◆ MapLiquidMagic

TC_COMMON_API u_map_magic const MapLiquidMagic
extern

Definition at line 24 of file MapDefines.cpp.

◆ MapMagic

TC_COMMON_API u_map_magic const MapMagic
extern

Definition at line 20 of file MapDefines.cpp.

◆ MapVersionMagic

TC_COMMON_API uint32 const MapVersionMagic
extern

Definition at line 21 of file MapDefines.cpp.