diff options
Diffstat (limited to 'src/server/game/Pools/PoolMgr.cpp')
-rw-r--r-- | src/server/game/Pools/PoolMgr.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index 76ea5eb5015..9305e226421 100644 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -18,9 +18,10 @@ #include "PoolMgr.h" #include "Containers.h" -#include "ObjectMgr.h" +#include "DatabaseEnv.h" #include "Log.h" #include "MapManager.h" +#include "ObjectMgr.h" //////////////////////////////////////////////////////////// // template class ActivePoolData @@ -177,7 +178,7 @@ PoolObject* PoolGroup<T>::RollOne(ActivePoolData& spawns, uint32 triggerFrom) return &EqualChanced[index]; } - return NULL; + return nullptr; } // Main method to despawn a creature or gameobject in a pool @@ -797,8 +798,8 @@ void PoolMgr::LoadFromDB() if (checkedPools.find(poolItr->second) != checkedPools.end()) { std::ostringstream ss; - ss<< "The pool(s) "; - for (std::set<uint32>::const_iterator itr=checkedPools.begin(); itr != checkedPools.end(); ++itr) + ss << "The pool(s) "; + for (std::set<uint32>::const_iterator itr = checkedPools.begin(); itr != checkedPools.end(); ++itr) ss << *itr << ' '; ss << "create(s) a circular reference, which can cause the server to freeze.\nRemoving the last link between mother pool " << poolItr->first << " and child pool " << poolItr->second; @@ -909,8 +910,8 @@ void PoolMgr::LoadFromDB() uint32 oldMSTime = getMSTime(); QueryResult 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"); + " 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"); if (!result) { |