TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ActivePoolData Class Reference

#include <PoolMgr.h>

Public Member Functions

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

Private Attributes

ActivePoolObjects mSpawnedCreatures
 
ActivePoolObjects mSpawnedGameobjects
 
ActivePoolObjects mActiveQuests
 
ActivePoolPools mSpawnedPools
 

Member Function Documentation

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

+ Here is the caller graph for this function:

template<>
void ActivePoolData::ActivateObject ( uint64  db_guid,
uint32  pool_id 
)
70 {
71  mSpawnedCreatures.insert(db_guid);
72  ++mSpawnedPools[pool_id];
73 }
ActivePoolObjects mSpawnedCreatures
Definition: PoolMgr.h:62
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
template<>
void ActivePoolData::ActivateObject ( uint64  db_guid,
uint32  pool_id 
)
77 {
78  mSpawnedGameobjects.insert(db_guid);
79  ++mSpawnedPools[pool_id];
80 }
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
ActivePoolObjects mSpawnedGameobjects
Definition: PoolMgr.h:63
template<>
void ActivePoolData::ActivateObject ( uint64  sub_pool_id,
uint32  pool_id 
)
84 {
85  mSpawnedPools[sub_pool_id] = 0;
86  ++mSpawnedPools[pool_id];
87 }
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
template<>
void ActivePoolData::ActivateObject ( uint64  quest_id,
uint32  pool_id 
)
91 {
92  mActiveQuests.insert(quest_id);
93  ++mSpawnedPools[pool_id];
94 }
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
ActivePoolObjects mActiveQuests
Definition: PoolMgr.h:64
uint32 ActivePoolData::GetActiveObjectCount ( uint32  pool_id) const
30 {
31  ActivePoolPools::const_iterator itr = mSpawnedPools.find(pool_id);
32  return itr != mSpawnedPools.end() ? itr->second : 0;
33 }
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65

+ Here is the caller graph for this function:

ActivePoolObjects ActivePoolData::GetActiveQuests ( ) const
inline
60 { return mActiveQuests; } // a copy of the set
ActivePoolObjects mActiveQuests
Definition: PoolMgr.h:64

+ Here is the caller graph for this function:

template<>
bool ActivePoolData::IsActiveObject ( uint64  db_guid) const
38 {
39  return mSpawnedCreatures.find(db_guid) != mSpawnedCreatures.end();
40 }
ActivePoolObjects mSpawnedCreatures
Definition: PoolMgr.h:62
template<>
bool ActivePoolData::IsActiveObject ( uint64  db_guid) const
45 {
46  return mSpawnedGameobjects.find(db_guid) != mSpawnedGameobjects.end();
47 }
ActivePoolObjects mSpawnedGameobjects
Definition: PoolMgr.h:63
template<typename T >
bool ActivePoolData::IsActiveObject ( uint64  db_guid_or_pool_id) const

+ Here is the caller graph for this function:

template<>
bool ActivePoolData::IsActiveObject ( uint64  sub_pool_id) const
52 {
53  return mSpawnedPools.find(sub_pool_id) != mSpawnedPools.end();
54 }
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
template<>
bool ActivePoolData::IsActiveObject ( uint64  quest_id) const
59 {
60  return mActiveQuests.find(quest_id) != mActiveQuests.end();
61 }
ActivePoolObjects mActiveQuests
Definition: PoolMgr.h:64
template<typename T >
void ActivePoolData::RemoveObject ( uint64  db_guid_or_pool_id,
uint32  pool_id 
)

+ Here is the caller graph for this function:

template<>
void ActivePoolData::RemoveObject ( uint64  db_guid,
uint32  pool_id 
)
98 {
99  mSpawnedCreatures.erase(db_guid);
100  uint32& val = mSpawnedPools[pool_id];
101  if (val > 0)
102  --val;
103 }
ActivePoolObjects mSpawnedCreatures
Definition: PoolMgr.h:62
uint32_t uint32
Definition: Define.h:150
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
template<>
void ActivePoolData::RemoveObject ( uint64  db_guid,
uint32  pool_id 
)
107 {
108  mSpawnedGameobjects.erase(db_guid);
109  uint32& val = mSpawnedPools[pool_id];
110  if (val > 0)
111  --val;
112 }
uint32_t uint32
Definition: Define.h:150
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
ActivePoolObjects mSpawnedGameobjects
Definition: PoolMgr.h:63
template<>
void ActivePoolData::RemoveObject ( uint64  sub_pool_id,
uint32  pool_id 
)
116 {
117  mSpawnedPools.erase(sub_pool_id);
118  uint32& val = mSpawnedPools[pool_id];
119  if (val > 0)
120  --val;
121 }
uint32_t uint32
Definition: Define.h:150
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
template<>
void ActivePoolData::RemoveObject ( uint64  quest_id,
uint32  pool_id 
)
125 {
126  mActiveQuests.erase(quest_id);
127  uint32& val = mSpawnedPools[pool_id];
128  if (val > 0)
129  --val;
130 }
uint32_t uint32
Definition: Define.h:150
ActivePoolPools mSpawnedPools
Definition: PoolMgr.h:65
ActivePoolObjects mActiveQuests
Definition: PoolMgr.h:64

Member Data Documentation

ActivePoolObjects ActivePoolData::mActiveQuests
private
ActivePoolObjects ActivePoolData::mSpawnedCreatures
private
ActivePoolObjects ActivePoolData::mSpawnedGameobjects
private
ActivePoolPools ActivePoolData::mSpawnedPools
private

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