![]() |
TrinityCore
|
#include <MMapManager.h>
Public Member Functions | |
| MMapManager () | |
| ~MMapManager () | |
| void | InitializeThreadUnsafe (const std::vector< uint32 > &mapIds) |
| bool | loadMap (std::string const &basePath, uint32 mapId, int32 x, int32 y) |
| bool | loadMapInstance (std::string const &basePath, uint32 mapId, uint32 instanceId) |
| bool | unloadMap (uint32 mapId, int32 x, int32 y) |
| bool | unloadMap (uint32 mapId) |
| bool | unloadMapInstance (uint32 mapId, uint32 instanceId) |
| dtNavMeshQuery const * | GetNavMeshQuery (uint32 mapId, 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 |
Definition at line 58 of file MMapManager.h.
|
inline |
Definition at line 61 of file MMapManager.h.
| MMAP::MMapManager::~MMapManager | ( | ) |
Definition at line 29 of file MMapManager.cpp.
References loadedMMaps.
|
inline |
Definition at line 76 of file MMapManager.h.
Referenced by mmaps_commandscript::HandleMmapStatsCommand().
|
inline |
Definition at line 75 of file MMapManager.h.
Referenced by mmaps_commandscript::HandleMmapStatsCommand().
|
private |
Definition at line 47 of file MMapManager.cpp.
References loadedMMaps.
Referenced by GetNavMesh(), GetNavMeshQuery(), unloadMap(), and unloadMapInstance().
| dtNavMesh const * MMAP::MMapManager::GetNavMesh | ( | uint32 | mapId | ) |
Definition at line 327 of file MMapManager.cpp.
References GetMMapData(), and loadedMMaps.
Referenced by misc_commandscript::HandleGPSCommand(), mmaps_commandscript::HandleMmapLoadedTilesCommand(), mmaps_commandscript::HandleMmapLocCommand(), mmaps_commandscript::HandleMmapStatsCommand(), and PathGenerator::PathGenerator().
Definition at line 336 of file MMapManager.cpp.
References GetMMapData(), and loadedMMaps.
Referenced by mmaps_commandscript::HandleMmapLoadedTilesCommand(), mmaps_commandscript::HandleMmapLocCommand(), and PathGenerator::PathGenerator().
| void MMAP::MMapManager::InitializeThreadUnsafe | ( | const std::vector< uint32 > & | mapIds | ) |
Definition at line 38 of file MMapManager.cpp.
References loadedMMaps, and thread_safe_environment.
Referenced by World::SetInitialWorldSettings().
Definition at line 115 of file MMapManager.cpp.
References ASSERT, loadedMMaps, MMAP::MMapData::loadedTileRefs, loadedTiles, loadMapData(), MMAP_MAGIC, MMAP_VERSION, MmapTileHeader::mmapMagic, MmapTileHeader::mmapVersion, MMAP::MMapData::navMesh, packTileID(), MmapTileHeader::size, Trinity::StringFormat(), TC_LOG_DEBUG, TC_LOG_ERROR, and MMAP::TILE_FILE_NAME_FORMAT.
Referenced by Map::LoadMMap().
|
private |
Definition at line 57 of file MMapManager.cpp.
References ABORT_MSG, ASSERT, loadedMMaps, MMAP::MAP_FILE_NAME_FORMAT, params, Trinity::StringFormat(), TC_LOG_DEBUG, TC_LOG_ERROR, and thread_safe_environment.
Referenced by loadMap(), and loadMapInstance().
| bool MMAP::MMapManager::loadMapInstance | ( | std::string const & | basePath, |
| uint32 | mapId, | ||
| uint32 | instanceId | ||
| ) |
Definition at line 199 of file MMapManager.cpp.
References ASSERT, loadedMMaps, loadMapData(), MMAP::MMapData::navMesh, MMAP::MMapData::navMeshQueries, TC_LOG_DEBUG, and TC_LOG_ERROR.
Referenced by Map::Map().
Definition at line 110 of file MMapManager.cpp.
Referenced by loadMap(), and unloadMap().
| bool MMAP::MMapManager::unloadMap | ( | uint32 | mapId | ) |
Definition at line 269 of file MMapManager.cpp.
References loadedMMaps, MMAP::MMapData::loadedTileRefs, loadedTiles, MMAP::MMapData::navMesh, TC_LOG_DEBUG, and TC_LOG_ERROR.
Definition at line 225 of file MMapManager.cpp.
References ABORT, GetMMapData(), loadedMMaps, MMAP::MMapData::loadedTileRefs, loadedTiles, MMAP::MMapData::navMesh, packTileID(), TC_LOG_DEBUG, and TC_LOG_ERROR.
Referenced by MapInstanced::DestroyInstance(), and Map::UnloadGrid().
Definition at line 301 of file MMapManager.cpp.
References GetMMapData(), loadedMMaps, MMAP::MMapData::navMeshQueries, and TC_LOG_DEBUG.
Referenced by Map::~Map().
|
private |
Definition at line 82 of file MMapManager.h.
Referenced by GetMMapData(), GetNavMesh(), GetNavMeshQuery(), InitializeThreadUnsafe(), loadMap(), loadMapData(), loadMapInstance(), unloadMap(), unloadMap(), unloadMapInstance(), and ~MMapManager().
|
private |
Definition at line 83 of file MMapManager.h.
Referenced by loadMap(), unloadMap(), and unloadMap().
|
private |
Definition at line 84 of file MMapManager.h.
Referenced by InitializeThreadUnsafe(), and loadMapData().