aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Pools/PoolMgr.h
diff options
context:
space:
mode:
authorShocker <none@none>2010-08-26 06:49:31 +0300
committerShocker <none@none>2010-08-26 06:49:31 +0300
commit2748f86bdbbdaa039a82af18e062b307b1fd562f (patch)
treefd59d7f23aa492beed681696c2f799859ac1dbdb /src/server/game/Pools/PoolMgr.h
parentaa768001a766cc25d3944bb80a80e4deb6c2c429 (diff)
Fix crash when using a pool template with an entry > 65535, fixes issue #3632
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Pools/PoolMgr.h')
-rw-r--r--src/server/game/Pools/PoolMgr.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h
index 6632c7e74a7..7adfddf1a26 100644
--- a/src/server/game/Pools/PoolMgr.h
+++ b/src/server/game/Pools/PoolMgr.h
@@ -80,7 +80,7 @@ class PoolGroup
void Spawn1Object(PoolObject* obj);
void ReSpawn1Object(PoolObject* obj);
- void RemoveOneRelation(uint16 child_pool_id);
+ void RemoveOneRelation(uint32 child_pool_id);
private:
uint32 poolId;
PoolObjectList ExplicitlyChanced;
@@ -98,30 +98,30 @@ class PoolMgr
void Initialize();
template<typename T>
- uint16 IsPartOfAPool(uint32 db_guid_or_pool_id) const;
+ uint32 IsPartOfAPool(uint32 db_guid_or_pool_id) const;
template<typename T>
bool IsSpawnedObject(uint32 db_guid_or_pool_id) const { return mSpawnedData.IsSpawnedObject<T>(db_guid_or_pool_id); }
- bool CheckPool(uint16 pool_id) const;
+ bool CheckPool(uint32 pool_id) const;
- void SpawnPool(uint16 pool_id);
- void DespawnPool(uint16 pool_id);
+ void SpawnPool(uint32 pool_id);
+ void DespawnPool(uint32 pool_id);
template<typename T>
- void UpdatePool(uint16 pool_id, uint32 db_guid_or_pool_id);
+ void UpdatePool(uint32 pool_id, uint32 db_guid_or_pool_id);
protected:
template<typename T>
- void SpawnPool(uint16 pool_id, uint32 db_guid_or_pool_id);
+ void SpawnPool(uint32 pool_id, uint32 db_guid_or_pool_id);
- uint16 max_pool_id;
+ uint32 max_pool_id;
typedef std::vector<PoolTemplateData> PoolTemplateDataMap;
typedef std::vector<PoolGroup<Creature> > PoolGroupCreatureMap;
typedef std::vector<PoolGroup<GameObject> > PoolGroupGameObjectMap;
typedef std::vector<PoolGroup<Pool> > PoolGroupPoolMap;
- typedef std::pair<uint32, uint16> SearchPair;
- typedef std::map<uint32, uint16> SearchMap;
+ typedef std::pair<uint32, uint32> SearchPair;
+ typedef std::map<uint32, uint32> SearchMap;
PoolTemplateDataMap mPoolTemplate;
PoolGroupCreatureMap mPoolCreatureGroups;
@@ -139,7 +139,7 @@ class PoolMgr
// Method that tell if the creature is part of a pool and return the pool id if yes
template<>
-inline uint16 PoolMgr::IsPartOfAPool<Creature>(uint32 db_guid) const
+inline uint32 PoolMgr::IsPartOfAPool<Creature>(uint32 db_guid) const
{
SearchMap::const_iterator itr = mCreatureSearchMap.find(db_guid);
if (itr != mCreatureSearchMap.end())
@@ -150,7 +150,7 @@ inline uint16 PoolMgr::IsPartOfAPool<Creature>(uint32 db_guid) const
// Method that tell if the gameobject is part of a pool and return the pool id if yes
template<>
-inline uint16 PoolMgr::IsPartOfAPool<GameObject>(uint32 db_guid) const
+inline uint32 PoolMgr::IsPartOfAPool<GameObject>(uint32 db_guid) const
{
SearchMap::const_iterator itr = mGameobjectSearchMap.find(db_guid);
if (itr != mGameobjectSearchMap.end())
@@ -161,7 +161,7 @@ inline uint16 PoolMgr::IsPartOfAPool<GameObject>(uint32 db_guid) const
// Method that tell if the pool is part of another pool and return the pool id if yes
template<>
-inline uint16 PoolMgr::IsPartOfAPool<Pool>(uint32 pool_id) const
+inline uint32 PoolMgr::IsPartOfAPool<Pool>(uint32 pool_id) const
{
SearchMap::const_iterator itr = mPoolSearchMap.find(pool_id);
if (itr != mPoolSearchMap.end())