From 10f0988fd90b70e489a97c2c5e37ebdfeace149d Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 19 Feb 2009 18:52:03 -0600 Subject: [7304] Move inner template class from parent class definition for better compatibility with some GCC versions. Author: VladimirMangos --HG-- branch : trunk --- src/game/PoolHandler.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/game/PoolHandler.cpp') diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp index 7aee571331c..0f18aee0549 100644 --- a/src/game/PoolHandler.cpp +++ b/src/game/PoolHandler.cpp @@ -31,14 +31,14 @@ INSTANTIATE_SINGLETON_1(PoolHandler); // Methods of template class PoolGroup template -PoolHandler::PoolGroup::PoolGroup() +PoolGroup::PoolGroup() { Spawned = 0; } // Method to add a gameobject/creature guid to the proper list depending on pool type and chance value template -void PoolHandler::PoolGroup::AddEntry(PoolObject& poolitem, uint32 maxentries) +void PoolGroup::AddEntry(PoolObject& poolitem, uint32 maxentries) { if (poolitem.chance != 0 && maxentries == 1) ExplicitlyChanced.push_back(poolitem); @@ -48,7 +48,7 @@ void PoolHandler::PoolGroup::AddEntry(PoolObject& poolitem, uint32 maxentries // Method to check the chances are proper in this object pool template -bool PoolHandler::PoolGroup::CheckPool(void) +bool PoolGroup::CheckPool(void) { if (EqualChanced.size() == 0) { @@ -63,7 +63,7 @@ bool PoolHandler::PoolGroup::CheckPool(void) // Method that tell if the gameobject, creature or pool is spawned currently template -bool PoolHandler::PoolGroup::IsSpawnedObject(uint32 guid) +bool PoolGroup::IsSpawnedObject(uint32 guid) { for (uint32 i=0; i::IsSpawnedObject(uint32 guid) // Method that return a guid of a rolled creature or gameobject // Note: Copy from loot system because it's very similar and only few things change template -uint32 PoolHandler::PoolGroup::RollOne(void) +uint32 PoolGroup::RollOne(void) { if (!ExplicitlyChanced.empty()) // First explicitly chanced entries are checked { @@ -100,7 +100,7 @@ uint32 PoolHandler::PoolGroup::RollOne(void) // If no guid is passed, the pool is just removed (event end case) // If guid is filled, cache will be used and no removal will occur, it just fill the cache template -void PoolHandler::PoolGroup::DespawnObject(uint32 guid) +void PoolGroup::DespawnObject(uint32 guid) { for (int i=0; i::DespawnObject(uint32 guid) // Method that is actualy doing the removal job on one creature template<> -void PoolHandler::PoolGroup::Despawn1Object(uint32 guid) +void PoolGroup::Despawn1Object(uint32 guid) { if (CreatureData const* data = objmgr.GetCreatureData(guid)) { @@ -138,7 +138,7 @@ void PoolHandler::PoolGroup::Despawn1Object(uint32 guid) // Same on one gameobject template<> -void PoolHandler::PoolGroup::Despawn1Object(uint32 guid) +void PoolGroup::Despawn1Object(uint32 guid) { if (GameObjectData const* data = objmgr.GetGOData(guid)) { @@ -151,14 +151,14 @@ void PoolHandler::PoolGroup::Despawn1Object(uint32 guid) // Same on one pool template<> -void PoolHandler::PoolGroup::Despawn1Object(uint32 child_pool_id) +void PoolGroup::Despawn1Object(uint32 child_pool_id) { poolhandler.DespawnPool(child_pool_id); } // Method for a pool only to remove any found record causing a circular dependency loop template<> -void PoolHandler::PoolGroup::RemoveOneRelation(uint16 child_pool_id) +void PoolGroup::RemoveOneRelation(uint16 child_pool_id) { for (PoolObjectList::iterator itr = ExplicitlyChanced.begin(); itr != ExplicitlyChanced.end(); ++itr) { @@ -182,7 +182,7 @@ void PoolHandler::PoolGroup::RemoveOneRelation(uint16 child_p // if cache is false (initialization or event start), X creatures are spawned with X <= limit (< if limit higher that the number of creatures in pool) // if cache is true, this means only one has to be spawned (or respawned if the rolled one is same as cached one) template -void PoolHandler::PoolGroup::SpawnObject(uint32 limit, bool cache) +void PoolGroup::SpawnObject(uint32 limit, bool cache) { if (limit == 1) // This is the only case where explicit chance is used { @@ -227,7 +227,7 @@ void PoolHandler::PoolGroup::SpawnObject(uint32 limit, bool cache) // Method that is actualy doing the spawn job on 1 creature template <> -bool PoolHandler::PoolGroup::Spawn1Object(uint32 guid) +bool PoolGroup::Spawn1Object(uint32 guid) { CreatureData const* data = objmgr.GetCreatureData(guid); if (data) @@ -257,7 +257,7 @@ bool PoolHandler::PoolGroup::Spawn1Object(uint32 guid) // Same for 1 gameobject template <> -bool PoolHandler::PoolGroup::Spawn1Object(uint32 guid) +bool PoolGroup::Spawn1Object(uint32 guid) { GameObjectData const* data = objmgr.GetGOData(guid); if (data) @@ -288,7 +288,7 @@ bool PoolHandler::PoolGroup::Spawn1Object(uint32 guid) // Same for 1 pool template <> -bool PoolHandler::PoolGroup::Spawn1Object(uint32 child_pool_id) +bool PoolGroup::Spawn1Object(uint32 child_pool_id) { poolhandler.SpawnPool(child_pool_id); return true; @@ -296,7 +296,7 @@ bool PoolHandler::PoolGroup::Spawn1Object(uint32 child_pool_i // Method that does the respawn job on the specified creature template <> -bool PoolHandler::PoolGroup::ReSpawn1Object(uint32 guid) +bool PoolGroup::ReSpawn1Object(uint32 guid) { CreatureData const* data = objmgr.GetCreatureData(guid); if (data) @@ -310,7 +310,7 @@ bool PoolHandler::PoolGroup::ReSpawn1Object(uint32 guid) // Same for 1 gameobject template <> -bool PoolHandler::PoolGroup::ReSpawn1Object(uint32 guid) +bool PoolGroup::ReSpawn1Object(uint32 guid) { GameObjectData const* data = objmgr.GetGOData(guid); if (data) @@ -324,7 +324,7 @@ bool PoolHandler::PoolGroup::ReSpawn1Object(uint32 guid) // Nothing to do for a child Pool template <> -bool PoolHandler::PoolGroup::ReSpawn1Object(uint32 guid) +bool PoolGroup::ReSpawn1Object(uint32 guid) { return true; } -- cgit v1.2.3