* Renamed PoolHandler to PoolMgr since the pool systems has nothing to do with

* the client/server protocol.

--HG--
branch : trunk
rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp
rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h
This commit is contained in:
Brian
2010-06-25 03:50:19 -06:00
parent be2d40d189
commit 852a0c44a2
8 changed files with 29 additions and 29 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ set(game_STAT_SRCS
OutdoorPvP/Zones/OutdoorPvPZM.cpp
OutdoorPvP/OutdoorPvP.cpp
OutdoorPvP/OutdoorPvPMgr.cpp
Pools/PoolHandler.cpp
Pools/PoolMgr.cpp
Quests/QuestDef.cpp
Reputation/ReputationMgr.cpp
Scripting/ScriptLoader.cpp
+1 -1
View File
@@ -32,7 +32,7 @@
#include "World.h"
#include "GameEventMgr.h"
#include "SpellMgr.h"
#include "PoolHandler.h"
#include "PoolMgr.h"
#include "AccountMgr.h"
#include "WaypointManager.h"
#include "Util.h"
@@ -28,7 +28,7 @@
#include "QuestDef.h"
#include "GossipDef.h"
#include "Player.h"
#include "PoolHandler.h"
#include "PoolMgr.h"
#include "Opcodes.h"
#include "Log.h"
#include "LootMgr.h"
@@ -22,7 +22,7 @@
#include "QuestDef.h"
#include "GameObject.h"
#include "ObjectMgr.h"
#include "PoolHandler.h"
#include "PoolMgr.h"
#include "SpellMgr.h"
#include "Spell.h"
#include "UpdateMask.h"
+1 -1
View File
@@ -22,7 +22,7 @@
#include "World.h"
#include "ObjectMgr.h"
#include "WorldPacket.h"
#include "PoolHandler.h"
#include "PoolMgr.h"
#include "ProgressBar.h"
#include "Language.h"
#include "Log.h"
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "PoolHandler.h"
#include "PoolMgr.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "Log.h"
@@ -372,13 +372,13 @@ void PoolGroup<Pool>::ReSpawn1Object(PoolObject* /*obj*/)
}
////////////////////////////////////////////////////////////
// Methods of class PoolHandler
// Methods of class PoolMgr
PoolHandler::PoolHandler()
PoolMgr::PoolMgr()
{
}
void PoolHandler::LoadFromDB()
void PoolMgr::LoadFromDB()
{
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT MAX(entry) FROM pool_template");
if (!result)
@@ -654,7 +654,7 @@ void PoolHandler::LoadFromDB()
}
// The initialize method will spawn all pools not in an event and not in another pool, this is why there is 2 left joins with 2 null checks
void PoolHandler::Initialize()
void PoolMgr::Initialize()
{
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT DISTINCT pool_template.entry, pool_pool.pool_id, pool_pool.mother_pool FROM pool_template LEFT JOIN game_event_pool ON pool_template.entry=game_event_pool.pool_entry LEFT JOIN pool_pool ON pool_template.entry=pool_pool.pool_id WHERE game_event_pool.pool_entry IS NULL");
uint32 count=0;
@@ -692,7 +692,7 @@ void PoolHandler::Initialize()
// Call to spawn a pool, if cache if true the method will spawn only if cached entry is different
// If it's same, the creature is respawned only (added back to map)
template<>
void PoolHandler::SpawnPool<Creature>(uint16 pool_id, uint32 db_guid)
void PoolMgr::SpawnPool<Creature>(uint16 pool_id, uint32 db_guid)
{
if (!mPoolCreatureGroups[pool_id].isEmpty())
mPoolCreatureGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, db_guid);
@@ -701,7 +701,7 @@ void PoolHandler::SpawnPool<Creature>(uint16 pool_id, uint32 db_guid)
// Call to spawn a pool, if cache if true the method will spawn only if cached entry is different
// If it's same, the gameobject is respawned only (added back to map)
template<>
void PoolHandler::SpawnPool<GameObject>(uint16 pool_id, uint32 db_guid)
void PoolMgr::SpawnPool<GameObject>(uint16 pool_id, uint32 db_guid)
{
if (!mPoolGameobjectGroups[pool_id].isEmpty())
mPoolGameobjectGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, db_guid);
@@ -710,13 +710,13 @@ void PoolHandler::SpawnPool<GameObject>(uint16 pool_id, uint32 db_guid)
// Call to spawn a pool, if cache if true the method will spawn only if cached entry is different
// If it's same, the pool is respawned only
template<>
void PoolHandler::SpawnPool<Pool>(uint16 pool_id, uint32 sub_pool_id)
void PoolMgr::SpawnPool<Pool>(uint16 pool_id, uint32 sub_pool_id)
{
if (!mPoolPoolGroups[pool_id].isEmpty())
mPoolPoolGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, sub_pool_id);
}
void PoolHandler::SpawnPool(uint16 pool_id)
void PoolMgr::SpawnPool(uint16 pool_id)
{
SpawnPool<Pool>(pool_id, 0);
SpawnPool<GameObject>(pool_id, 0);
@@ -724,7 +724,7 @@ void PoolHandler::SpawnPool(uint16 pool_id)
}
// Call to despawn a pool, all gameobjects/creatures in this pool are removed
void PoolHandler::DespawnPool(uint16 pool_id)
void PoolMgr::DespawnPool(uint16 pool_id)
{
if (!mPoolCreatureGroups[pool_id].isEmpty())
mPoolCreatureGroups[pool_id].DespawnObject(mSpawnedData);
@@ -737,7 +737,7 @@ void PoolHandler::DespawnPool(uint16 pool_id)
}
// Method that check chance integrity of the creatures and gameobjects in this pool
bool PoolHandler::CheckPool(uint16 pool_id) const
bool PoolMgr::CheckPool(uint16 pool_id) const
{
return pool_id <= max_pool_id &&
mPoolGameobjectGroups[pool_id].CheckPool() &&
@@ -749,7 +749,7 @@ bool PoolHandler::CheckPool(uint16 pool_id) const
// Here we cache only the creature/gameobject whose guid is passed as parameter
// Then the spawn pool call will use this cache to decide
template<typename T>
void PoolHandler::UpdatePool(uint16 pool_id, uint32 db_guid_or_pool_id)
void PoolMgr::UpdatePool(uint16 pool_id, uint32 db_guid_or_pool_id)
{
if (uint16 motherpoolid = IsPartOfAPool<Pool>(pool_id))
SpawnPool<Pool>(motherpoolid, pool_id);
@@ -757,6 +757,6 @@ void PoolHandler::UpdatePool(uint16 pool_id, uint32 db_guid_or_pool_id)
SpawnPool<T>(pool_id, db_guid_or_pool_id);
}
template void PoolHandler::UpdatePool<Pool>(uint16 pool_id, uint32 db_guid_or_pool_id);
template void PoolHandler::UpdatePool<GameObject>(uint16 pool_id, uint32 db_guid_or_pool_id);
template void PoolHandler::UpdatePool<Creature>(uint16 pool_id, uint32 db_guid_or_pool_id);
template void PoolMgr::UpdatePool<Pool>(uint16 pool_id, uint32 db_guid_or_pool_id);
template void PoolMgr::UpdatePool<GameObject>(uint16 pool_id, uint32 db_guid_or_pool_id);
template void PoolMgr::UpdatePool<Creature>(uint16 pool_id, uint32 db_guid_or_pool_id);
@@ -87,11 +87,11 @@ class PoolGroup
PoolObjectList EqualChanced;
};
class PoolHandler
class PoolMgr
{
friend class ACE_Singleton<PoolHandler, ACE_Null_Mutex>;
PoolHandler();
~PoolHandler() {};
friend class ACE_Singleton<PoolMgr, ACE_Null_Mutex>;
PoolMgr();
~PoolMgr() {};
public:
void LoadFromDB();
@@ -135,11 +135,11 @@ class PoolHandler
SpawnedPoolData mSpawnedData;
};
#define poolhandler (*ACE_Singleton<PoolHandler, ACE_Null_Mutex>::instance())
#define poolhandler (*ACE_Singleton<PoolMgr, ACE_Null_Mutex>::instance())
// Method that tell if the creature is part of a pool and return the pool id if yes
template<>
inline uint16 PoolHandler::IsPartOfAPool<Creature>(uint32 db_guid) const
inline uint16 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 PoolHandler::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 PoolHandler::IsPartOfAPool<GameObject>(uint32 db_guid) const
inline uint16 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 PoolHandler::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 PoolHandler::IsPartOfAPool<Pool>(uint32 pool_id) const
inline uint16 PoolMgr::IsPartOfAPool<Pool>(uint32 pool_id) const
{
SearchMap::const_iterator itr = mPoolSearchMap.find(pool_id);
if (itr != mPoolSearchMap.end())
+1 -1
View File
@@ -56,7 +56,7 @@
#include "VMapFactory.h"
#include "GlobalEvents.h"
#include "GameEventMgr.h"
#include "PoolHandler.h"
#include "PoolMgr.h"
#include "DatabaseImpl.h"
#include "GridNotifiersImpl.h"
#include "CellImpl.h"