AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ActivePoolData Class Reference

#include "PoolMgr.h"

Public Member Functions

template<typename T >
bool IsActiveObject (uint32 db_guid_or_pool_id) const
 
uint32 GetActiveObjectCount (uint32 pool_id) const
 
template<typename T >
void ActivateObject (uint32 db_guid_or_pool_id, uint32 pool_id)
 
template<typename T >
void RemoveObject (uint32 db_guid_or_pool_id, uint32 pool_id)
 
ActivePoolObjects GetActiveQuests () const
 
template<>
bool IsActiveObject (uint32 db_guid) const
 
template<>
bool IsActiveObject (uint32 db_guid) const
 
template<>
bool IsActiveObject (uint32 sub_pool_id) const
 
template<>
bool IsActiveObject (uint32 quest_id) const
 
template<>
void ActivateObject (uint32 db_guid, uint32 pool_id)
 
template<>
void ActivateObject (uint32 db_guid, uint32 pool_id)
 
template<>
void ActivateObject (uint32 sub_pool_id, uint32 pool_id)
 
template<>
void ActivateObject (uint32 quest_id, uint32 pool_id)
 
template<>
void RemoveObject (uint32 db_guid, uint32 pool_id)
 
template<>
void RemoveObject (uint32 db_guid, uint32 pool_id)
 
template<>
void RemoveObject (uint32 sub_pool_id, uint32 pool_id)
 
template<>
void RemoveObject (uint32 quest_id, uint32 pool_id)
 

Private Attributes

ActivePoolObjects mSpawnedCreatures
 
ActivePoolObjects mSpawnedGameobjects
 
ActivePoolObjects mActiveQuests
 
ActivePoolPools mSpawnedPools
 

Detailed Description

Member Function Documentation

◆ ActivateObject() [1/5]

template<>
void ActivePoolData::ActivateObject ( uint32  db_guid,
uint32  pool_id 
)
66{
67 mSpawnedCreatures.insert(db_guid);
68 ++mSpawnedPools[pool_id];
69}
ActivePoolObjects mSpawnedCreatures
Definition: PoolMgr.h:61
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:64

References mSpawnedCreatures, and mSpawnedPools.

◆ ActivateObject() [2/5]

template<>
void ActivePoolData::ActivateObject ( uint32  db_guid,
uint32  pool_id 
)
73{
74 mSpawnedGameobjects.insert(db_guid);
75 ++mSpawnedPools[pool_id];
76}
ActivePoolObjects mSpawnedGameobjects
Definition: PoolMgr.h:62

References mSpawnedGameobjects, and mSpawnedPools.

◆ ActivateObject() [3/5]

template<typename T >
void ActivePoolData::ActivateObject ( uint32  db_guid_or_pool_id,
uint32  pool_id 
)

◆ ActivateObject() [4/5]

template<>
void ActivePoolData::ActivateObject ( uint32  quest_id,
uint32  pool_id 
)
87{
88 mActiveQuests.insert(quest_id);
89 ++mSpawnedPools[pool_id];
90}
ActivePoolObjects mActiveQuests
Definition: PoolMgr.h:63

References mActiveQuests, and mSpawnedPools.

◆ ActivateObject() [5/5]

template<>
void ActivePoolData::ActivateObject ( uint32  sub_pool_id,
uint32  pool_id 
)
80{
81 mSpawnedPools[sub_pool_id] = 0;
82 ++mSpawnedPools[pool_id];
83}

References mSpawnedPools.

◆ GetActiveObjectCount()

uint32 ActivePoolData::GetActiveObjectCount ( uint32  pool_id) const
31{
32 ActivePoolPools::const_iterator itr = mSpawnedPools.find(pool_id);
33 return itr != mSpawnedPools.end() ? itr->second : 0;
34}

References mSpawnedPools.

Referenced by PoolGroup< T >::SpawnObject().

◆ GetActiveQuests()

ActivePoolObjects ActivePoolData::GetActiveQuests ( ) const
inline
59{ return mActiveQuests; } // a copy of the set

References mActiveQuests.

Referenced by PoolGroup< T >::SpawnObject().

◆ IsActiveObject() [1/5]

template<>
bool ActivePoolData::IsActiveObject ( uint32  db_guid) const
39{
40 return mSpawnedCreatures.find(db_guid) != mSpawnedCreatures.end();
41}

References mSpawnedCreatures.

◆ IsActiveObject() [2/5]

template<>
bool ActivePoolData::IsActiveObject ( uint32  db_guid) const
46{
47 return mSpawnedGameobjects.find(db_guid) != mSpawnedGameobjects.end();
48}

References mSpawnedGameobjects.

◆ IsActiveObject() [3/5]

template<typename T >
bool ActivePoolData::IsActiveObject ( uint32  db_guid_or_pool_id) const

◆ IsActiveObject() [4/5]

template<>
bool ActivePoolData::IsActiveObject ( uint32  quest_id) const
60{
61 return mActiveQuests.find(quest_id) != mActiveQuests.end();
62}

References mActiveQuests.

◆ IsActiveObject() [5/5]

template<>
bool ActivePoolData::IsActiveObject ( uint32  sub_pool_id) const
53{
54 return mSpawnedPools.find(sub_pool_id) != mSpawnedPools.end();
55}

References mSpawnedPools.

◆ RemoveObject() [1/5]

template<>
void ActivePoolData::RemoveObject ( uint32  db_guid,
uint32  pool_id 
)
94{
95 mSpawnedCreatures.erase(db_guid);
96 uint32& val = mSpawnedPools[pool_id];
97 if (val > 0)
98 --val;
99}
std::uint32_t uint32
Definition: Define.h:107

References mSpawnedCreatures, and mSpawnedPools.

◆ RemoveObject() [2/5]

template<>
void ActivePoolData::RemoveObject ( uint32  db_guid,
uint32  pool_id 
)
103{
104 mSpawnedGameobjects.erase(db_guid);
105 uint32& val = mSpawnedPools[pool_id];
106 if (val > 0)
107 --val;
108}

References mSpawnedGameobjects, and mSpawnedPools.

◆ RemoveObject() [3/5]

template<typename T >
void ActivePoolData::RemoveObject ( uint32  db_guid_or_pool_id,
uint32  pool_id 
)

◆ RemoveObject() [4/5]

template<>
void ActivePoolData::RemoveObject ( uint32  quest_id,
uint32  pool_id 
)
121{
122 mActiveQuests.erase(quest_id);
123 uint32& val = mSpawnedPools[pool_id];
124 if (val > 0)
125 --val;
126}

References mActiveQuests, and mSpawnedPools.

◆ RemoveObject() [5/5]

template<>
void ActivePoolData::RemoveObject ( uint32  sub_pool_id,
uint32  pool_id 
)
112{
113 mSpawnedPools.erase(sub_pool_id);
114 uint32& val = mSpawnedPools[pool_id];
115 if (val > 0)
116 --val;
117}

References mSpawnedPools.

Member Data Documentation

◆ mActiveQuests

ActivePoolObjects ActivePoolData::mActiveQuests
private

◆ mSpawnedCreatures

ActivePoolObjects ActivePoolData::mSpawnedCreatures
private

◆ mSpawnedGameobjects

ActivePoolObjects ActivePoolData::mSpawnedGameobjects
private

◆ mSpawnedPools

ActivePoolPools ActivePoolData::mSpawnedPools
private