diff options
Diffstat (limited to 'src/game/PoolHandler.h')
-rw-r--r-- | src/game/PoolHandler.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/PoolHandler.h b/src/game/PoolHandler.h index ee59f9587e4..10ed000ea25 100644 --- a/src/game/PoolHandler.h +++ b/src/game/PoolHandler.h @@ -15,16 +15,20 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #ifndef MANGOS_POOLHANDLER_H #define MANGOS_POOLHANDLER_H + #include "Platform/Define.h" #include "Policies/Singleton.h" #include "Creature.h" #include "GameObject.h" + struct PoolTemplateData { uint32 MaxLimit; }; + struct PoolObject { uint32 guid; @@ -32,6 +36,7 @@ struct PoolObject bool spawned; PoolObject(uint32 _guid, float _chance): guid(_guid), chance(fabs(_chance)), spawned(false) {} }; + template <class T> class PoolGroup { @@ -56,9 +61,11 @@ class PoolGroup uint32 m_LastDespawnedNode ; // Store the guid of the removed creature/gameobject during a pool update uint32 m_SpawnedPoolAmount; // Used to know the number of spawned objects }; + class Pool // for Pool of Pool case { }; + class PoolHandler { public: @@ -72,6 +79,7 @@ class PoolHandler void DespawnPool(uint16 pool_id); void UpdatePool(uint16 pool_id, uint32 guid, uint32 type); void Initialize(); + protected: bool m_IsPoolSystemStarted; uint16 max_pool_id; @@ -81,6 +89,7 @@ class PoolHandler typedef std::vector<PoolGroup<Pool> > PoolGroupPoolMap; typedef std::pair<uint32, uint16> SearchPair; typedef std::map<uint32, uint16> SearchMap; + PoolTemplateDataMap mPoolTemplate; PoolGroupCreatureMap mPoolCreatureGroups; PoolGroupGameObjectMap mPoolGameobjectGroups; @@ -88,6 +97,8 @@ class PoolHandler SearchMap mCreatureSearchMap; SearchMap mGameobjectSearchMap; SearchMap mPoolSearchMap; + }; + #define poolhandler MaNGOS::Singleton<PoolHandler>::Instance() #endif |