TrinityCore
PoolMgr Class Reference

#include <PoolMgr.h>

Public Member Functions

 PoolMgr (PoolMgr const &right)=delete
 
 PoolMgr (PoolMgr &&right)=delete
 
PoolMgroperator= (PoolMgr const &right)=delete
 
PoolMgroperator= (PoolMgr &&right)=delete
 
void LoadFromDB ()
 
void Initialize ()
 
template<typename T >
uint32 IsPartOfAPool (uint64 db_guid_or_pool_id) const
 
uint32 IsPartOfAPool (SpawnObjectType type, uint64 spawnId) const
 
template<typename T >
bool IsSpawnedObject (SpawnedPoolData &spawnedPoolData, uint64 db_guid_or_pool_id) const
 
bool IsEmpty (uint32 pool_id) const
 
bool CheckPool (uint32 pool_id) const
 
void SpawnPool (SpawnedPoolData &spawnedPoolData, uint32 pool_id)
 
void DespawnPool (SpawnedPoolData &spawnedPoolData, uint32 pool_id, bool alwaysDeleteRespawnTime=false)
 
template<typename T >
void UpdatePool (SpawnedPoolData &spawnedPoolData, uint32 pool_id, uint64 db_guid_or_pool_id)
 
void UpdatePool (SpawnedPoolData &spawnedPoolData, uint32 pool_id, SpawnObjectType type, uint64 spawnId)
 
std::unique_ptr< SpawnedPoolDataInitPoolsForMap (Map *map)
 
PoolTemplateData const * GetPoolTemplate (uint16 pool_id) const
 
template<>
uint32 IsPartOfAPool (uint64 db_guid) const
 
template<>
uint32 IsPartOfAPool (uint64 db_guid) const
 
template<>
uint32 IsPartOfAPool (uint64 pool_id) const
 

Static Public Member Functions

static PoolMgrinstance ()
 

Private Types

typedef std::unordered_map< uint32, PoolTemplateDataPoolTemplateDataMap
 
typedef std::unordered_map< uint32, PoolGroup< Creature > > PoolGroupCreatureMap
 
typedef std::unordered_map< uint32, PoolGroup< GameObject > > PoolGroupGameObjectMap
 
typedef std::unordered_map< uint32, PoolGroup< Pool > > PoolGroupPoolMap
 
typedef std::pair< uint64, uint32SearchPair
 
typedef std::map< uint64, uint32SearchMap
 

Private Member Functions

 PoolMgr ()
 
 ~PoolMgr ()
 
template<typename T >
void SpawnPool (SpawnedPoolData &spawnedPoolData, uint32 pool_id, uint64 db_guid_or_pool_id)
 
template<>
void SpawnPool (SpawnedPoolData &spawnedPoolData, uint32 pool_id, uint64 db_guid)
 
template<>
void SpawnPool (SpawnedPoolData &spawnedPoolData, uint32 pool_id, uint64 db_guid)
 
template<>
void SpawnPool (SpawnedPoolData &spawnedPoolData, uint32 pool_id, uint64 sub_pool_id)
 

Private Attributes

PoolTemplateDataMap mPoolTemplate
 
PoolGroupCreatureMap mPoolCreatureGroups
 
PoolGroupGameObjectMap mPoolGameobjectGroups
 
PoolGroupPoolMap mPoolPoolGroups
 
SearchMap mCreatureSearchMap
 
SearchMap mGameobjectSearchMap
 
SearchMap mPoolSearchMap
 
std::unordered_map< uint32, std::vector< uint32 > > mAutoSpawnPoolsPerMap
 

Detailed Description

Definition at line 119 of file PoolMgr.h.

Member Typedef Documentation

◆ PoolGroupCreatureMap

typedef std::unordered_map<uint32, PoolGroup<Creature> > PoolMgr::PoolGroupCreatureMap
private

Definition at line 163 of file PoolMgr.h.

◆ PoolGroupGameObjectMap

typedef std::unordered_map<uint32, PoolGroup<GameObject> > PoolMgr::PoolGroupGameObjectMap
private

Definition at line 164 of file PoolMgr.h.

◆ PoolGroupPoolMap

typedef std::unordered_map<uint32, PoolGroup<Pool> > PoolMgr::PoolGroupPoolMap
private

Definition at line 165 of file PoolMgr.h.

◆ PoolTemplateDataMap

typedef std::unordered_map<uint32, PoolTemplateData> PoolMgr::PoolTemplateDataMap
private

Definition at line 162 of file PoolMgr.h.

◆ SearchMap

typedef std::map<uint64, uint32> PoolMgr::SearchMap
private

Definition at line 167 of file PoolMgr.h.

◆ SearchPair

typedef std::pair<uint64, uint32> PoolMgr::SearchPair
private

Definition at line 166 of file PoolMgr.h.

Constructor & Destructor Documentation

◆ PoolMgr() [1/3]

PoolMgr::PoolMgr ( )
privatedefault

◆ ~PoolMgr()

PoolMgr::~PoolMgr ( )
privatedefault

◆ PoolMgr() [2/3]

PoolMgr::PoolMgr ( PoolMgr const &  right)
delete

◆ PoolMgr() [3/3]

PoolMgr::PoolMgr ( PoolMgr &&  right)
delete

Member Function Documentation

◆ CheckPool()

bool PoolMgr::CheckPool ( uint32  pool_id) const

Definition at line 871 of file PoolMgr.cpp.

+ Here is the caller graph for this function:

◆ DespawnPool()

void PoolMgr::DespawnPool ( SpawnedPoolData spawnedPoolData,
uint32  pool_id,
bool  alwaysDeleteRespawnTime = false 
)

Definition at line 814 of file PoolMgr.cpp.

◆ GetPoolTemplate()

PoolTemplateData const * PoolMgr::GetPoolTemplate ( uint16  pool_id) const

Definition at line 932 of file PoolMgr.cpp.

+ Here is the call graph for this function:

◆ Initialize()

void PoolMgr::Initialize ( )

Definition at line 430 of file PoolMgr.cpp.

◆ InitPoolsForMap()

std::unique_ptr< SpawnedPoolData > PoolMgr::InitPoolsForMap ( Map map)

Definition at line 922 of file PoolMgr.cpp.

+ Here is the call graph for this function:

◆ instance()

PoolMgr * PoolMgr::instance ( )
static

Definition at line 436 of file PoolMgr.cpp.

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

◆ IsEmpty()

bool PoolMgr::IsEmpty ( uint32  pool_id) const

Definition at line 850 of file PoolMgr.cpp.

+ Here is the caller graph for this function:

◆ IsPartOfAPool() [1/5]

uint32 PoolMgr::IsPartOfAPool ( SpawnObjectType  type,
uint64  spawnId 
) const

Definition at line 834 of file PoolMgr.cpp.

◆ IsPartOfAPool() [2/5]

template<>
uint32 PoolMgr::IsPartOfAPool ( uint64  db_guid) const
inline

Definition at line 183 of file PoolMgr.h.

◆ IsPartOfAPool() [3/5]

template<>
uint32 PoolMgr::IsPartOfAPool ( uint64  db_guid) const
inline

Definition at line 194 of file PoolMgr.h.

◆ IsPartOfAPool() [4/5]

template<typename T >
uint32 PoolMgr::IsPartOfAPool ( uint64  db_guid_or_pool_id) const

◆ IsPartOfAPool() [5/5]

template<>
uint32 PoolMgr::IsPartOfAPool ( uint64  pool_id) const
inline

Definition at line 205 of file PoolMgr.h.

◆ IsSpawnedObject()

template<typename T >
bool PoolMgr::IsSpawnedObject ( SpawnedPoolData spawnedPoolData,
uint64  db_guid_or_pool_id 
) const
inline

Definition at line 142 of file PoolMgr.h.

+ Here is the call graph for this function:

◆ LoadFromDB()

void PoolMgr::LoadFromDB ( )

Definition at line 442 of file PoolMgr.cpp.

+ Here is the call graph for this function:

◆ operator=() [1/2]

PoolMgr & PoolMgr::operator= ( PoolMgr &&  right)
delete

◆ operator=() [2/2]

PoolMgr & PoolMgr::operator= ( PoolMgr const &  right)
delete

◆ SpawnPool() [1/5]

void PoolMgr::SpawnPool ( SpawnedPoolData spawnedPoolData,
uint32  pool_id 
)

Definition at line 806 of file PoolMgr.cpp.

+ Here is the caller graph for this function:

◆ SpawnPool() [2/5]

template<>
void PoolMgr::SpawnPool ( SpawnedPoolData spawnedPoolData,
uint32  pool_id,
uint64  db_guid 
)
private

Definition at line 779 of file PoolMgr.cpp.

◆ SpawnPool() [3/5]

template<>
void PoolMgr::SpawnPool ( SpawnedPoolData spawnedPoolData,
uint32  pool_id,
uint64  db_guid 
)
private

Definition at line 789 of file PoolMgr.cpp.

◆ SpawnPool() [4/5]

template<typename T >
void PoolMgr::SpawnPool ( SpawnedPoolData spawnedPoolData,
uint32  pool_id,
uint64  db_guid_or_pool_id 
)
private

◆ SpawnPool() [5/5]

template<>
void PoolMgr::SpawnPool ( SpawnedPoolData spawnedPoolData,
uint32  pool_id,
uint64  sub_pool_id 
)
private

Definition at line 799 of file PoolMgr.cpp.

◆ UpdatePool() [1/2]

void PoolMgr::UpdatePool ( SpawnedPoolData spawnedPoolData,
uint32  pool_id,
SpawnObjectType  type,
uint64  spawnId 
)

Definition at line 907 of file PoolMgr.cpp.

◆ UpdatePool() [2/2]

template<typename T >
template void PoolMgr::UpdatePool< Creature > ( SpawnedPoolData spawnedPoolData,
uint32  pool_id,
uint64  db_guid_or_pool_id 
)

Definition at line 895 of file PoolMgr.cpp.

Member Data Documentation

◆ mAutoSpawnPoolsPerMap

std::unordered_map<uint32, std::vector<uint32> > PoolMgr::mAutoSpawnPoolsPerMap
private

Definition at line 176 of file PoolMgr.h.

◆ mCreatureSearchMap

SearchMap PoolMgr::mCreatureSearchMap
private

Definition at line 173 of file PoolMgr.h.

◆ mGameobjectSearchMap

SearchMap PoolMgr::mGameobjectSearchMap
private

Definition at line 174 of file PoolMgr.h.

◆ mPoolCreatureGroups

PoolGroupCreatureMap PoolMgr::mPoolCreatureGroups
private

Definition at line 170 of file PoolMgr.h.

◆ mPoolGameobjectGroups

PoolGroupGameObjectMap PoolMgr::mPoolGameobjectGroups
private

Definition at line 171 of file PoolMgr.h.

◆ mPoolPoolGroups

PoolGroupPoolMap PoolMgr::mPoolPoolGroups
private

Definition at line 172 of file PoolMgr.h.

◆ mPoolSearchMap

SearchMap PoolMgr::mPoolSearchMap
private

Definition at line 175 of file PoolMgr.h.

◆ mPoolTemplate

PoolTemplateDataMap PoolMgr::mPoolTemplate
private

Definition at line 169 of file PoolMgr.h.


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