![]() |
TrinityCore
|
#include <PoolMgr.h>
Public Member Functions | |
| PoolMgr (PoolMgr const &right)=delete | |
| PoolMgr (PoolMgr &&right)=delete | |
| PoolMgr & | operator= (PoolMgr const &right)=delete |
| PoolMgr & | operator= (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< SpawnedPoolData > | InitPoolsForMap (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 PoolMgr * | instance () |
Private Types | |
| typedef std::unordered_map< uint32, PoolTemplateData > | PoolTemplateDataMap |
| 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, uint32 > | SearchPair |
| typedef std::map< uint64, uint32 > | SearchMap |
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 |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
privatedefault |
|
privatedefault |
|
delete |
|
delete |
| bool PoolMgr::CheckPool | ( | uint32 | pool_id | ) | const |
Definition at line 837 of file PoolMgr.cpp.
References mPoolCreatureGroups, mPoolGameobjectGroups, and mPoolPoolGroups.
Referenced by LoadFromDB().
| void PoolMgr::DespawnPool | ( | SpawnedPoolData & | spawnedPoolData, |
| uint32 | pool_id, | ||
| bool | alwaysDeleteRespawnTime = false |
||
| ) |
Definition at line 780 of file PoolMgr.cpp.
References mPoolCreatureGroups, mPoolGameobjectGroups, and mPoolPoolGroups.
| PoolTemplateData const * PoolMgr::GetPoolTemplate | ( | uint16 | pool_id | ) | const |
Definition at line 898 of file PoolMgr.cpp.
References Trinity::Containers::MapGetValuePtr(), and mPoolTemplate.
| void PoolMgr::Initialize | ( | ) |
Definition at line 401 of file PoolMgr.cpp.
References mCreatureSearchMap, and mGameobjectSearchMap.
| std::unique_ptr< SpawnedPoolData > PoolMgr::InitPoolsForMap | ( | Map * | map | ) |
Definition at line 888 of file PoolMgr.cpp.
References Trinity::Containers::MapGetValuePtr(), mAutoSpawnPoolsPerMap, and SpawnPool().
|
static |
| bool PoolMgr::IsEmpty | ( | uint32 | pool_id | ) | const |
Definition at line 816 of file PoolMgr.cpp.
References mPoolCreatureGroups, mPoolGameobjectGroups, and mPoolPoolGroups.
Referenced by LoadFromDB().
| uint32 PoolMgr::IsPartOfAPool | ( | SpawnObjectType | type, |
| uint64 | spawnId | ||
| ) | const |
Definition at line 800 of file PoolMgr.cpp.
References ABORT_MSG, SPAWN_TYPE_AREATRIGGER, SPAWN_TYPE_CREATURE, SPAWN_TYPE_GAMEOBJECT, and UI64FMTD.
Definition at line 183 of file PoolMgr.h.
References mCreatureSearchMap.
Definition at line 194 of file PoolMgr.h.
References mGameobjectSearchMap.
Definition at line 205 of file PoolMgr.h.
References mPoolSearchMap.
|
inline |
Definition at line 142 of file PoolMgr.h.
References SpawnedPoolData::IsSpawnedObject().
| void PoolMgr::LoadFromDB | ( | ) |
Definition at line 413 of file PoolMgr.cpp.
References PoolGroup< T >::AddEntry(), ASSERT, CheckPool(), Field::GetFloat(), getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt32(), Field::GetUInt64(), IsEmpty(), SpawnMetadata::mapId, PoolTemplateData::MapId, mAutoSpawnPoolsPerMap, PoolTemplateData::MaxLimit, mCreatureSearchMap, mGameobjectSearchMap, mPoolCreatureGroups, mPoolGameobjectGroups, mPoolPoolGroups, mPoolSearchMap, mPoolTemplate, PoolGroup< T >::SetPoolId(), sObjectMgr, TC_LOG_DEBUG, TC_LOG_ERROR, TC_LOG_INFO, and WorldDatabase.
| void PoolMgr::SpawnPool | ( | SpawnedPoolData & | spawnedPoolData, |
| uint32 | pool_id | ||
| ) |
Definition at line 772 of file PoolMgr.cpp.
Referenced by InitPoolsForMap().
|
private |
Definition at line 745 of file PoolMgr.cpp.
References mPoolCreatureGroups, and mPoolTemplate.
|
private |
Definition at line 755 of file PoolMgr.cpp.
References mPoolGameobjectGroups, and mPoolTemplate.
|
private |
|
private |
Definition at line 765 of file PoolMgr.cpp.
References mPoolPoolGroups, and mPoolTemplate.
| void PoolMgr::UpdatePool | ( | SpawnedPoolData & | spawnedPoolData, |
| uint32 | pool_id, | ||
| SpawnObjectType | type, | ||
| uint64 | spawnId | ||
| ) |
Definition at line 873 of file PoolMgr.cpp.
References ABORT_MSG, SPAWN_TYPE_CREATURE, SPAWN_TYPE_GAMEOBJECT, and UI64FMTD.
| template void PoolMgr::UpdatePool< Creature > | ( | SpawnedPoolData & | spawnedPoolData, |
| uint32 | pool_id, | ||
| uint64 | db_guid_or_pool_id | ||
| ) |
Definition at line 861 of file PoolMgr.cpp.
Definition at line 176 of file PoolMgr.h.
Referenced by InitPoolsForMap(), and LoadFromDB().
|
private |
Definition at line 173 of file PoolMgr.h.
Referenced by Initialize(), IsPartOfAPool(), and LoadFromDB().
|
private |
Definition at line 174 of file PoolMgr.h.
Referenced by Initialize(), IsPartOfAPool(), and LoadFromDB().
|
private |
Definition at line 170 of file PoolMgr.h.
Referenced by CheckPool(), DespawnPool(), IsEmpty(), LoadFromDB(), and SpawnPool().
|
private |
Definition at line 171 of file PoolMgr.h.
Referenced by CheckPool(), DespawnPool(), IsEmpty(), LoadFromDB(), and SpawnPool().
|
private |
Definition at line 172 of file PoolMgr.h.
Referenced by CheckPool(), DespawnPool(), IsEmpty(), LoadFromDB(), and SpawnPool().
|
private |
Definition at line 175 of file PoolMgr.h.
Referenced by IsPartOfAPool(), and LoadFromDB().
|
private |
Definition at line 169 of file PoolMgr.h.
Referenced by GetPoolTemplate(), LoadFromDB(), SpawnPool(), and SpawnPool().