TrinityCore
Loading...
Searching...
No Matches
MMAP::MMapManager Class Reference

#include <MMapManager.h>

Public Member Functions

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

Static Public Member Functions

static MMapManagerinstance ()
 
static LoadResult parseNavMeshParamsFile (std::string_view basePath, uint32 mapId, dtNavMeshParams *params, std::vector< OffMeshData > *offmeshConnections=nullptr)
 
static bool isRebuildingTilesEnabledOnMap (uint32 mapId)
 

Private Member Functions

LoadResult loadMapData (std::string_view basePath, uint32 mapId, uint32 instanceId)
 
uint32 packTileID (int32 x, int32 y)
 
MMapDataSet::const_iterator GetMMapData (uint32 mapId) const
 

Private Attributes

MMapDataSet loadedMMaps
 
uint32 loadedTiles = 0
 
std::unordered_map< uint32, uint32parentMapData
 

Detailed Description

Definition at line 48 of file MMapManager.h.

Constructor & Destructor Documentation

◆ MMapManager() [1/3]

MMAP::MMapManager::MMapManager ( )
default

◆ MMapManager() [2/3]

MMAP::MMapManager::MMapManager ( MMapManager const &  other)
delete

◆ MMapManager() [3/3]

MMAP::MMapManager::MMapManager ( MMapManager &&  other)
deletenoexcept

◆ ~MMapManager()

MMAP::MMapManager::~MMapManager ( )
default

Member Function Documentation

◆ getLoadedMapsCount()

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

Definition at line 73 of file MMapManager.h.

+ Here is the caller graph for this function:

◆ getLoadedTilesCount()

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

Definition at line 72 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 107 of file MMapManager.cpp.

+ Here is the caller graph for this function:

◆ GetNavMesh()

dtNavMesh * MMAP::MMapManager::GetNavMesh ( uint32  mapId,
uint32  instanceId 
)

Definition at line 448 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 461 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 96 of file MMapManager.cpp.

+ Here is the caller graph for this function:

◆ instance()

MMapManager * MMAP::MMapManager::instance ( )
static

Definition at line 90 of file MMapManager.cpp.

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

◆ isRebuildingTilesEnabledOnMap()

bool MMAP::MMapManager::isRebuildingTilesEnabledOnMap ( uint32  mapId)
static

Definition at line 117 of file MMapManager.cpp.

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

◆ loadMap()

LoadResult MMAP::MMapManager::loadMap ( std::string_view  basePath,
uint32  mapId,
uint32  instanceId,
int32  x,
int32  y 
)

Definition at line 206 of file MMapManager.cpp.

+ Here is the call graph for this function:

◆ loadMapData()

LoadResult MMAP::MMapManager::loadMapData ( std::string_view  basePath,
uint32  mapId,
uint32  instanceId 
)
private

Definition at line 122 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_view  basePath,
uint32  meshMapId,
uint32  instanceMapId,
uint32  instanceId 
)

Definition at line 305 of file MMapManager.cpp.

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

◆ operator=() [1/2]

MMapManager & MMAP::MMapManager::operator= ( MMapManager &&  other)
deletenoexcept

◆ operator=() [2/2]

MMapManager & MMAP::MMapManager::operator= ( MMapManager const &  other)
delete

◆ packTileID()

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

Definition at line 201 of file MMapManager.cpp.

+ Here is the caller graph for this function:

◆ parseNavMeshParamsFile()

LoadResult MMAP::MMapManager::parseNavMeshParamsFile ( std::string_view  basePath,
uint32  mapId,
dtNavMeshParams *  params,
std::vector< OffMeshData > *  offmeshConnections = nullptr 
)
static

Definition at line 154 of file MMapManager.cpp.

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

◆ unloadMap() [1/2]

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

Definition at line 375 of file MMapManager.cpp.

+ Here is the call graph for this function:

◆ unloadMap() [2/2]

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

Definition at line 338 of file MMapManager.cpp.

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

◆ unloadMapInstance()

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

Definition at line 409 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 82 of file MMapManager.h.

◆ loadedTiles

uint32 MMAP::MMapManager::loadedTiles = 0
private

Definition at line 83 of file MMapManager.h.

◆ parentMapData

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

Definition at line 85 of file MMapManager.h.


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