TrinityCore
MMAP::MMapManager Class Reference

#include <MMapManager.h>

Public Member Functions

 MMapManager ()
 
 ~MMapManager ()
 
void InitializeThreadUnsafe (std::unordered_map< uint32, std::vector< uint32 > > const &mapData)
 
bool loadMap (std::string const &basePath, uint32 mapId, int32 x, int32 y)
 
bool loadMapInstance (std::string const &basePath, uint32 meshMapId, uint32 instanceMapId, uint32 instanceId)
 
bool unloadMap (uint32 mapId, int32 x, int32 y)
 
bool unloadMap (uint32 mapId)
 
bool unloadMapInstance (uint32 meshMapId, uint32 instanceMapId, uint32 instanceId)
 
dtNavMeshQuery const * GetNavMeshQuery (uint32 meshMapId, uint32 instanceMapId, uint32 instanceId)
 
dtNavMesh const * GetNavMesh (uint32 mapId)
 
uint32 getLoadedTilesCount () const
 
uint32 getLoadedMapsCount () const
 

Private Member Functions

bool loadMapData (std::string const &basePath, uint32 mapId)
 
uint32 packTileID (int32 x, int32 y)
 
MMapDataSet::const_iterator GetMMapData (uint32 mapId) const
 

Private Attributes

MMapDataSet loadedMMaps
 
uint32 loadedTiles
 
bool thread_safe_environment
 
std::unordered_map< uint32, uint32parentMapData
 

Detailed Description

Definition at line 59 of file MMapManager.h.

Constructor & Destructor Documentation

◆ MMapManager()

MMAP::MMapManager::MMapManager ( )
inline

Definition at line 62 of file MMapManager.h.

◆ ~MMapManager()

MMAP::MMapManager::~MMapManager ( )

Definition at line 29 of file MMapManager.cpp.

Member Function Documentation

◆ getLoadedMapsCount()

uint32 MMAP::MMapManager::getLoadedMapsCount ( ) const
inline

Definition at line 77 of file MMapManager.h.

+ Here is the caller graph for this function:

◆ getLoadedTilesCount()

uint32 MMAP::MMapManager::getLoadedTilesCount ( ) const
inline

Definition at line 76 of file MMapManager.h.

+ Here is the caller graph for this function:

◆ GetMMapData()

MMapDataSet::const_iterator MMAP::MMapManager::GetMMapData ( uint32  mapId) const
private

Definition at line 51 of file MMapManager.cpp.

+ Here is the caller graph for this function:

◆ GetNavMesh()

dtNavMesh const * MMAP::MMapManager::GetNavMesh ( uint32  mapId)

Definition at line 340 of file MMapManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNavMeshQuery()

dtNavMeshQuery const * MMAP::MMapManager::GetNavMeshQuery ( uint32  meshMapId,
uint32  instanceMapId,
uint32  instanceId 
)

Definition at line 349 of file MMapManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeThreadUnsafe()

void MMAP::MMapManager::InitializeThreadUnsafe ( std::unordered_map< uint32, std::vector< uint32 > > const &  mapData)

Definition at line 38 of file MMapManager.cpp.

+ Here is the caller graph for this function:

◆ loadMap()

bool MMAP::MMapManager::loadMap ( std::string const &  basePath,
uint32  mapId,
int32  x,
int32  y 
)

Definition at line 119 of file MMapManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadMapData()

bool MMAP::MMapManager::loadMapData ( std::string const &  basePath,
uint32  mapId 
)
private

Definition at line 61 of file MMapManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadMapInstance()

bool MMAP::MMapManager::loadMapInstance ( std::string const &  basePath,
uint32  meshMapId,
uint32  instanceMapId,
uint32  instanceId 
)

Definition at line 213 of file MMapManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ packTileID()

uint32 MMAP::MMapManager::packTileID ( int32  x,
int32  y 
)
private

Definition at line 114 of file MMapManager.cpp.

+ Here is the caller graph for this function:

◆ unloadMap() [1/2]

bool MMAP::MMapManager::unloadMap ( uint32  mapId)

Definition at line 282 of file MMapManager.cpp.

◆ unloadMap() [2/2]

bool MMAP::MMapManager::unloadMap ( uint32  mapId,
int32  x,
int32  y 
)

Definition at line 239 of file MMapManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unloadMapInstance()

bool MMAP::MMapManager::unloadMapInstance ( uint32  meshMapId,
uint32  instanceMapId,
uint32  instanceId 
)

Definition at line 314 of file MMapManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ loadedMMaps

MMapDataSet MMAP::MMapManager::loadedMMaps
private

Definition at line 83 of file MMapManager.h.

◆ loadedTiles

uint32 MMAP::MMapManager::loadedTiles
private

Definition at line 84 of file MMapManager.h.

◆ parentMapData

std::unordered_map<uint32, uint32> MMAP::MMapManager::parentMapData
private

Definition at line 87 of file MMapManager.h.

◆ thread_safe_environment

bool MMAP::MMapManager::thread_safe_environment
private

Definition at line 85 of file MMapManager.h.


The documentation for this class was generated from the following files: