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

@@ -12,14 +12,12 @@
#include "Battleground.h"
#include "BattlegroundQueue.h"
#include "CreatureAIImpl.h"
#include <ace/Singleton.h>
#include <unordered_map>
typedef std::map<uint32, Battleground*> BattlegroundContainer;
typedef std::unordered_map<uint32, BattlegroundTypeId> BattleMastersMap;
typedef Battleground*(*bgRef)(Battleground*);
#define BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY 86400 // how many seconds in day
struct CreateBattlegroundData
@@ -62,13 +60,13 @@ class RandomBattlegroundSystem
class BattlegroundMgr
{
friend class ACE_Singleton<BattlegroundMgr, ACE_Null_Mutex>;
private:
BattlegroundMgr();
~BattlegroundMgr();
public:
static BattlegroundMgr* instance();
void Update(uint32 diff);
/* Packet Building */
@@ -161,5 +159,6 @@ class BattlegroundMgr
BattleMastersMap mBattleMastersMap;
};
#define sBattlegroundMgr ACE_Singleton<BattlegroundMgr, ACE_Null_Mutex>::instance()
#endif
#define sBattlegroundMgr BattlegroundMgr::instance()
#endif