![]() |
TrinityCore
|
#include <TerrainMgr.h>
Public Member Functions | |
| TerrainInfo (uint32 mapId) | |
| TerrainInfo (TerrainInfo const &)=delete | |
| TerrainInfo (TerrainInfo &&)=delete | |
| TerrainInfo & | operator= (TerrainInfo const &)=delete |
| TerrainInfo & | operator= (TerrainInfo &&)=delete |
| ~TerrainInfo () | |
| uint32 | GetId () const |
| char const * | GetMapName () const |
| void | DiscoverGridMapFiles () |
| bool | HasChildTerrainGridFile (uint32 mapId, int32 gx, int32 gy) const |
| void | AddChildTerrain (std::shared_ptr< TerrainInfo > childTerrain) |
| void | LoadMapAndVMap (int32 gx, int32 gy) |
| void | LoadMMapInstance (uint32 mapId, uint32 instanceId) |
| void | LoadMMap (uint32 instanceId, int32 gx, int32 gy) |
| void | UnloadMap (int32 gx, int32 gy) |
| void | UnloadMMapInstance (uint32 mapId, uint32 instanceId) |
| void | CleanUpGrids (uint32 diff) |
| void | GetFullTerrainStatusForPosition (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z, PositionFullTerrainStatus &data, Optional< map_liquidHeaderTypeFlags > reqLiquidType={}, float collisionHeight=2.03128f, DynamicMapTree const *dynamicMapTree=nullptr) |
| ZLiquidStatus | GetLiquidStatus (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z, Optional< map_liquidHeaderTypeFlags > ReqLiquidType={}, LiquidData *data=nullptr, float collisionHeight=2.03128f) |
| bool | GetAreaInfo (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z, uint32 &mogpflags, int32 &adtId, int32 &rootId, int32 &groupId, DynamicMapTree const *dynamicMapTree=nullptr) |
| uint32 | GetAreaId (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z, DynamicMapTree const *dynamicMapTree=nullptr) |
| uint32 | GetAreaId (PhaseShift const &phaseShift, uint32 mapId, Position const &pos, DynamicMapTree const *dynamicMapTree=nullptr) |
| uint32 | GetZoneId (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z, DynamicMapTree const *dynamicMapTree=nullptr) |
| uint32 | GetZoneId (PhaseShift const &phaseShift, uint32 mapId, Position const &pos, DynamicMapTree const *dynamicMapTree=nullptr) |
| void | GetZoneAndAreaId (PhaseShift const &phaseShift, uint32 mapId, uint32 &zoneid, uint32 &areaid, float x, float y, float z, DynamicMapTree const *dynamicMapTree=nullptr) |
| void | GetZoneAndAreaId (PhaseShift const &phaseShift, uint32 mapId, uint32 &zoneid, uint32 &areaid, Position const &pos, DynamicMapTree const *dynamicMapTree=nullptr) |
| float | GetMinHeight (PhaseShift const &phaseShift, uint32 mapId, float x, float y) |
| float | GetGridHeight (PhaseShift const &phaseShift, uint32 mapId, float x, float y) |
| float | GetStaticHeight (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z, bool checkVMap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) |
| float | GetStaticHeight (PhaseShift const &phaseShift, uint32 mapId, Position const &pos, bool checkVMap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) |
| float | GetWaterLevel (PhaseShift const &phaseShift, uint32 mapId, float x, float y) |
| bool | IsInWater (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z, LiquidData *data=nullptr) |
| bool | IsUnderWater (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z) |
| float | GetWaterOrGroundLevel (PhaseShift const &phaseShift, uint32 mapId, float x, float y, float z, float *ground=nullptr, bool swim=false, float collisionHeight=2.03128f, DynamicMapTree const *dynamicMapTree=nullptr) |
Static Public Member Functions | |
| static bool | ExistMap (uint32 mapid, int32 gx, int32 gy, bool log=true) |
| static bool | ExistVMap (uint32 mapid, int32 gx, int32 gy) |
Private Member Functions | |
| void | LoadMapAndVMapImpl (int32 gx, int32 gy) |
| void | LoadMMapInstanceImpl (uint32 mapId, uint32 instanceId) |
| void | LoadMap (int32 gx, int32 gy) |
| void | LoadVMap (int32 gx, int32 gy) |
| void | LoadMMapImpl (uint32 instanceId, int32 gx, int32 gy) |
| void | UnloadMapImpl (int32 gx, int32 gy) |
| void | UnloadMMapInstanceImpl (uint32 mapId, uint32 instanceId) |
| GridMap * | GetGrid (uint32 mapId, float x, float y, bool loadIfMissing=true) |
Static Private Member Functions | |
| static constexpr int32 | GetBitsetIndex (int32 gx, int32 gy) |
Private Attributes | |
| uint32 | _mapId |
| TerrainInfo * | _parentTerrain |
| std::vector< std::shared_ptr< TerrainInfo > > | _childTerrain |
| std::mutex | _loadMutex |
| std::unique_ptr< GridMap > | _gridMap [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS] |
| std::atomic< uint16 > | _referenceCountFromMap [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS] |
| std::array< uint64, MAX_NUMBER_OF_GRIDS > | _loadedGrids |
| std::bitset< MAX_NUMBER_OF_GRIDS *MAX_NUMBER_OF_GRIDS > | _gridFileExists |
| TimeTracker | _cleanupTimer |
Static Private Attributes | |
| static constexpr Milliseconds | CleanupInterval = 1min |
Definition at line 38 of file TerrainMgr.h.
|
explicit |
Definition at line 34 of file TerrainMgr.cpp.
|
delete |
|
delete |
| TerrainInfo::~TerrainInfo | ( | ) |
| void TerrainInfo::AddChildTerrain | ( | std::shared_ptr< TerrainInfo > | childTerrain | ) |
Definition at line 150 of file TerrainMgr.cpp.
| void TerrainInfo::CleanUpGrids | ( | uint32 | diff | ) |
| void TerrainInfo::DiscoverGridMapFiles | ( | ) |
Definition at line 76 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 109 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| uint32 TerrainInfo::GetAreaId | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| DynamicMapTree const * | dynamicMapTree = nullptr |
||
| ) |
Definition at line 612 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 88 of file TerrainMgr.h.
Here is the call graph for this function:
Here is the caller graph for this function:| bool TerrainInfo::GetAreaInfo | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| uint32 & | mogpflags, | ||
| int32 & | adtId, | ||
| int32 & | rootId, | ||
| int32 & | groupId, | ||
| DynamicMapTree const * | dynamicMapTree = nullptr |
||
| ) |
Definition at line 572 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void TerrainInfo::GetFullTerrainStatusForPosition | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| PositionFullTerrainStatus & | data, | ||
| Optional< map_liquidHeaderTypeFlags > | reqLiquidType = {}, |
||
| float | collisionHeight = 2.03128f, |
||
| DynamicMapTree const * | dynamicMapTree = nullptr |
||
| ) |
|
private |
Definition at line 295 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| float TerrainInfo::GetGridHeight | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y | ||
| ) |
Definition at line 674 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
| ZLiquidStatus TerrainInfo::GetLiquidStatus | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| Optional< map_liquidHeaderTypeFlags > | ReqLiquidType = {}, |
||
| LiquidData * | data = nullptr, |
||
| float | collisionHeight = 2.03128f |
||
| ) |
Definition at line 479 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| char const * TerrainInfo::GetMapName | ( | ) | const |
Definition at line 44 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| float TerrainInfo::GetMinHeight | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y | ||
| ) |
| float TerrainInfo::GetStaticHeight | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| bool | checkVMap = true, |
||
| float | maxSearchDist = DEFAULT_HEIGHT_SEARCH |
||
| ) |
Definition at line 682 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 97 of file TerrainMgr.h.
Here is the call graph for this function:
Here is the caller graph for this function:| float TerrainInfo::GetWaterLevel | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y | ||
| ) |
| float TerrainInfo::GetWaterOrGroundLevel | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float * | ground = nullptr, |
||
| bool | swim = false, |
||
| float | collisionHeight = 2.03128f, |
||
| DynamicMapTree const * | dynamicMapTree = nullptr |
||
| ) |
| void TerrainInfo::GetZoneAndAreaId | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| uint32 & | zoneid, | ||
| uint32 & | areaid, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| DynamicMapTree const * | dynamicMapTree = nullptr |
||
| ) |
|
inline |
Definition at line 92 of file TerrainMgr.h.
Here is the call graph for this function:
Here is the caller graph for this function:| uint32 TerrainInfo::GetZoneId | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| DynamicMapTree const * | dynamicMapTree = nullptr |
||
| ) |
|
inline |
Definition at line 90 of file TerrainMgr.h.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 144 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool TerrainInfo::IsInWater | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| LiquidData * | data = nullptr |
||
| ) |
| bool TerrainInfo::IsUnderWater | ( | PhaseShift const & | phaseShift, |
| uint32 | mapId, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Definition at line 197 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 181 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 242 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 192 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 220 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
delete |
|
delete |
Definition at line 264 of file TerrainMgr.cpp.
Definition at line 278 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 290 of file TerrainMgr.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 111 of file TerrainMgr.h.
|
private |
Definition at line 122 of file TerrainMgr.h.
|
private |
Definition at line 117 of file TerrainMgr.h.
|
private |
Definition at line 114 of file TerrainMgr.h.
|
private |
Definition at line 116 of file TerrainMgr.h.
|
private |
Definition at line 113 of file TerrainMgr.h.
|
private |
Definition at line 108 of file TerrainMgr.h.
|
private |
Definition at line 110 of file TerrainMgr.h.
|
private |
Definition at line 115 of file TerrainMgr.h.
|
staticconstexprprivate |
Definition at line 119 of file TerrainMgr.h.