aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Pools/PoolMgr.h
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2019-08-04 12:22:57 +0200
committerGitHub <noreply@github.com>2019-08-04 12:22:57 +0200
commita5e73e41c0e813e674bb0a644e0052052435494e (patch)
treecabbeadc1e07635f1a8fc53599895613cbe61723 /src/server/game/Pools/PoolMgr.h
parent15e85f882fdb7b5d1d48302907e76c993ee4e923 (diff)
Core/Pooling: Quest pooling rewrite: (PR#23627)
- Split quest pooling from PoolMgr (into QuestPoolMgr) - Proper saving/restoring on server restart - No more hacking into sObjectMgr to insert/remove available quests
Diffstat (limited to 'src/server/game/Pools/PoolMgr.h')
-rw-r--r--src/server/game/Pools/PoolMgr.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h
index 6afe78206e0..7cd34ea5ae5 100644
--- a/src/server/game/Pools/PoolMgr.h
+++ b/src/server/game/Pools/PoolMgr.h
@@ -23,7 +23,6 @@
#include "Creature.h"
#include "GameObject.h"
#include "SpawnData.h"
-#include "QuestDef.h"
struct PoolTemplateData
{
@@ -57,12 +56,9 @@ class TC_GAME_API ActivePoolData
template<typename T>
void RemoveObject(uint32 db_guid_or_pool_id, uint32 pool_id);
-
- ActivePoolObjects GetActiveQuests() const { return mActiveQuests; } // a copy of the set
private:
ActivePoolObjects mSpawnedCreatures;
ActivePoolObjects mSpawnedGameobjects;
- ActivePoolObjects mActiveQuests;
ActivePoolPools mSpawnedPools;
};
@@ -97,10 +93,6 @@ class TC_GAME_API PoolGroup
PoolObjectList EqualChanced;
};
-typedef std::multimap<uint32, uint32> PooledQuestRelation;
-typedef std::pair<PooledQuestRelation::const_iterator, PooledQuestRelation::const_iterator> PooledQuestRelationBounds;
-typedef std::pair<PooledQuestRelation::iterator, PooledQuestRelation::iterator> PooledQuestRelationBoundsNC;
-
class TC_GAME_API PoolMgr
{
private:
@@ -111,8 +103,6 @@ class TC_GAME_API PoolMgr
static PoolMgr* instance();
void LoadFromDB();
- void LoadQuestPools();
- void SaveQuestsToDB();
void Initialize();
@@ -131,12 +121,6 @@ class TC_GAME_API PoolMgr
template<typename T>
void UpdatePool(uint32 pool_id, uint32 db_guid_or_pool_id);
- void ChangeDailyQuests();
- void ChangeWeeklyQuests();
-
- PooledQuestRelation mQuestCreatureRelation;
- PooledQuestRelation mQuestGORelation;
-
private:
template<typename T>
void SpawnPool(uint32 pool_id, uint32 db_guid_or_pool_id);
@@ -145,7 +129,6 @@ class TC_GAME_API PoolMgr
typedef std::unordered_map<uint32, PoolGroup<Creature>> PoolGroupCreatureMap;
typedef std::unordered_map<uint32, PoolGroup<GameObject>> PoolGroupGameObjectMap;
typedef std::unordered_map<uint32, PoolGroup<Pool>> PoolGroupPoolMap;
- typedef std::unordered_map<uint32, PoolGroup<Quest>> PoolGroupQuestMap;
typedef std::pair<uint32, uint32> SearchPair;
typedef std::map<uint32, uint32> SearchMap;
@@ -153,11 +136,9 @@ class TC_GAME_API PoolMgr
PoolGroupCreatureMap mPoolCreatureGroups;
PoolGroupGameObjectMap mPoolGameobjectGroups;
PoolGroupPoolMap mPoolPoolGroups;
- PoolGroupQuestMap mPoolQuestGroups;
SearchMap mCreatureSearchMap;
SearchMap mGameobjectSearchMap;
SearchMap mPoolSearchMap;
- SearchMap mQuestSearchMap;
// dynamic data
ActivePoolData mSpawnedData;
@@ -187,17 +168,6 @@ inline uint32 PoolMgr::IsPartOfAPool<GameObject>(uint32 db_guid) const
return 0;
}
-// Method that tell if the quest is part of another pool and return the pool id if yes
-template<>
-inline uint32 PoolMgr::IsPartOfAPool<Quest>(uint32 pool_id) const
-{
- SearchMap::const_iterator itr = mQuestSearchMap.find(pool_id);
- if (itr != mQuestSearchMap.end())
- return itr->second;
-
- return 0;
-}
-
// Method that tell if the pool is part of another pool and return the pool id if yes
template<>
inline uint32 PoolMgr::IsPartOfAPool<Pool>(uint32 pool_id) const