TrinityCore
TerrainMgr Class Reference

#include <TerrainMgr.h>

Public Member Functions

 TerrainMgr (TerrainMgr const &)=delete
 
 TerrainMgr (TerrainMgr &&)=delete
 
TerrainMgroperator= (TerrainMgr const &)=delete
 
TerrainMgroperator= (TerrainMgr &&)=delete
 
void InitializeParentMapData (std::unordered_map< uint32, std::vector< uint32 > > const &mapData)
 
std::shared_ptr< TerrainInfoLoadTerrain (uint32 mapId)
 
void UnloadAll ()
 
void Update (uint32 diff)
 
uint32 GetAreaId (PhaseShift const &phaseShift, uint32 mapid, float x, float y, float z)
 
uint32 GetAreaId (PhaseShift const &phaseShift, uint32 mapid, Position const &pos)
 
uint32 GetAreaId (PhaseShift const &phaseShift, WorldLocation const &loc)
 
uint32 GetZoneId (PhaseShift const &phaseShift, uint32 mapid, float x, float y, float z)
 
uint32 GetZoneId (PhaseShift const &phaseShift, uint32 mapid, Position const &pos)
 
uint32 GetZoneId (PhaseShift const &phaseShift, WorldLocation const &loc)
 
void GetZoneAndAreaId (PhaseShift const &phaseShift, uint32 &zoneid, uint32 &areaid, uint32 mapid, float x, float y, float z)
 
void GetZoneAndAreaId (PhaseShift const &phaseShift, uint32 &zoneid, uint32 &areaid, uint32 mapid, Position const &pos)
 
void GetZoneAndAreaId (PhaseShift const &phaseShift, uint32 &zoneid, uint32 &areaid, WorldLocation const &loc)
 

Static Public Member Functions

static TerrainMgrInstance ()
 
static bool ExistMapAndVMap (uint32 mapid, float x, float y)
 

Private Member Functions

 TerrainMgr ()
 
 ~TerrainMgr ()
 
std::shared_ptr< TerrainInfoLoadTerrainImpl (uint32 mapId)
 

Private Attributes

std::unordered_map< uint32, std::weak_ptr< TerrainInfo > > _terrainMaps
 
std::unordered_map< uint32, std::vector< uint32 > > _parentMapData
 

Detailed Description

Definition at line 123 of file TerrainMgr.h.

Constructor & Destructor Documentation

◆ TerrainMgr() [1/3]

TerrainMgr::TerrainMgr ( )
privatedefault

◆ ~TerrainMgr()

TerrainMgr::~TerrainMgr ( )
privatedefault

◆ TerrainMgr() [2/3]

TerrainMgr::TerrainMgr ( TerrainMgr const &  )
delete

◆ TerrainMgr() [3/3]

TerrainMgr::TerrainMgr ( TerrainMgr &&  )
delete

Member Function Documentation

◆ ExistMapAndVMap()

bool TerrainMgr::ExistMapAndVMap ( uint32  mapid,
float  x,
float  y 
)
static

Definition at line 859 of file TerrainMgr.cpp.

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

◆ GetAreaId() [1/3]

uint32 TerrainMgr::GetAreaId ( PhaseShift const &  phaseShift,
uint32  mapid,
float  x,
float  y,
float  z 
)

Definition at line 827 of file TerrainMgr.cpp.

+ Here is the call graph for this function:

◆ GetAreaId() [2/3]

uint32 TerrainMgr::GetAreaId ( PhaseShift const &  phaseShift,
uint32  mapid,
Position const &  pos 
)
inline

Definition at line 143 of file TerrainMgr.h.

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

◆ GetAreaId() [3/3]

uint32 TerrainMgr::GetAreaId ( PhaseShift const &  phaseShift,
WorldLocation const &  loc 
)
inline

Definition at line 144 of file TerrainMgr.h.

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

◆ GetZoneAndAreaId() [1/3]

void TerrainMgr::GetZoneAndAreaId ( PhaseShift const &  phaseShift,
uint32 zoneid,
uint32 areaid,
uint32  mapid,
float  x,
float  y,
float  z 
)

Definition at line 841 of file TerrainMgr.cpp.

+ Here is the call graph for this function:

◆ GetZoneAndAreaId() [2/3]

void TerrainMgr::GetZoneAndAreaId ( PhaseShift const &  phaseShift,
uint32 zoneid,
uint32 areaid,
uint32  mapid,
Position const &  pos 
)
inline

Definition at line 151 of file TerrainMgr.h.

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

◆ GetZoneAndAreaId() [3/3]

void TerrainMgr::GetZoneAndAreaId ( PhaseShift const &  phaseShift,
uint32 zoneid,
uint32 areaid,
WorldLocation const &  loc 
)
inline

Definition at line 152 of file TerrainMgr.h.

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

◆ GetZoneId() [1/3]

uint32 TerrainMgr::GetZoneId ( PhaseShift const &  phaseShift,
uint32  mapid,
float  x,
float  y,
float  z 
)

Definition at line 834 of file TerrainMgr.cpp.

+ Here is the call graph for this function:

◆ GetZoneId() [2/3]

uint32 TerrainMgr::GetZoneId ( PhaseShift const &  phaseShift,
uint32  mapid,
Position const &  pos 
)
inline

Definition at line 147 of file TerrainMgr.h.

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

◆ GetZoneId() [3/3]

uint32 TerrainMgr::GetZoneId ( PhaseShift const &  phaseShift,
WorldLocation const &  loc 
)
inline

Definition at line 148 of file TerrainMgr.h.

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

◆ InitializeParentMapData()

void TerrainMgr::InitializeParentMapData ( std::unordered_map< uint32, std::vector< uint32 > > const &  mapData)

Definition at line 783 of file TerrainMgr.cpp.

◆ Instance()

TerrainMgr & TerrainMgr::Instance ( )
static

Definition at line 777 of file TerrainMgr.cpp.

◆ LoadTerrain()

std::shared_ptr< TerrainInfo > TerrainMgr::LoadTerrain ( uint32  mapId)

Definition at line 788 of file TerrainMgr.cpp.

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

◆ LoadTerrainImpl()

std::shared_ptr< TerrainInfo > TerrainMgr::LoadTerrainImpl ( uint32  mapId)
private

Definition at line 847 of file TerrainMgr.cpp.

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

◆ operator=() [1/2]

TerrainMgr & TerrainMgr::operator= ( TerrainMgr &&  )
delete

◆ operator=() [2/2]

TerrainMgr & TerrainMgr::operator= ( TerrainMgr const &  )
delete

◆ UnloadAll()

void TerrainMgr::UnloadAll ( )

Definition at line 814 of file TerrainMgr.cpp.

◆ Update()

void TerrainMgr::Update ( uint32  diff)

Definition at line 819 of file TerrainMgr.cpp.

Member Data Documentation

◆ _parentMapData

std::unordered_map<uint32, std::vector<uint32> > TerrainMgr::_parentMapData
private

Definition at line 162 of file TerrainMgr.h.

◆ _terrainMaps

std::unordered_map<uint32, std::weak_ptr<TerrainInfo> > TerrainMgr::_terrainMaps
private

Definition at line 159 of file TerrainMgr.h.


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