feat(Core/Misc): remove and replace ACE_Singleton (#2418)

This commit is contained in:
Kargatum
2019-12-21 00:29:29 +07:00
committed by GitHub
parent 16b45bf334
commit 4a8f1de538
88 changed files with 486 additions and 250 deletions

View File

@@ -537,6 +537,12 @@ PoolMgr::PoolMgr()
{
}
PoolMgr* PoolMgr::instance()
{
static PoolMgr instance;
return &instance;
}
void PoolMgr::Initialize()
{
mQuestSearchMap.clear();

View File

@@ -8,7 +8,6 @@
#define ACORE_POOLHANDLER_H
#include "Define.h"
#include <ace/Singleton.h>
#include "Creature.h"
#include "GameObject.h"
#include "QuestDef.h"
@@ -92,13 +91,13 @@ typedef std::pair<PooledQuestRelation::iterator, PooledQuestRelation::iterator>
class PoolMgr
{
friend class ACE_Singleton<PoolMgr, ACE_Null_Mutex>;
private:
PoolMgr();
~PoolMgr() {};
public:
static PoolMgr* instance();
void LoadFromDB();
void LoadQuestPools();
void SaveQuestsToDB(bool daily, bool weekly, bool other);
@@ -151,7 +150,7 @@ class PoolMgr
ActivePoolData mSpawnedData;
};
#define sPoolMgr ACE_Singleton<PoolMgr, ACE_Null_Mutex>::instance()
#define sPoolMgr PoolMgr::instance()
// Method that tell if the creature is part of a pool and return the pool id if yes
template<>