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

@@ -23,7 +23,6 @@
#include "Map.h"
#include "ObjectAccessor.h"
#include "ObjectDefines.h"
#include <ace/Singleton.h>
#include "VehicleDefines.h"
#include <string>
#include <map>
@@ -465,12 +464,14 @@ typedef std::unordered_map<uint32, BroadcastText> BroadcastTextContainer;
typedef std::set<uint32> CellGuidSet;
typedef std::unordered_map<uint32/*player guid*/, uint32/*instance*/> CellCorpseSet;
struct CellObjectGuids
{
CellGuidSet creatures;
CellGuidSet gameobjects;
CellCorpseSet corpses;
};
typedef std::unordered_map<uint32/*cell_id*/, CellObjectGuids> CellObjectGuidsMap;
typedef std::unordered_map<uint32/*(mapid, spawnMode) pair*/, CellObjectGuidsMap> MapObjectGuids;
@@ -686,13 +687,14 @@ class PlayerDumpReader;
class ObjectMgr
{
friend class PlayerDumpReader;
friend class ACE_Singleton<ObjectMgr, ACE_Null_Mutex>;
private:
ObjectMgr();
~ObjectMgr();
public:
static ObjectMgr* instance();
typedef std::unordered_map<uint32, Item*> ItemMap;
typedef std::unordered_map<uint32, Quest*> QuestMap;
@@ -1499,6 +1501,6 @@ class ObjectMgr
std::set<uint32> _transportMaps; // Helper container storing map ids that are for transports only, loaded from gameobject_template
};
#define sObjectMgr ACE_Singleton<ObjectMgr, ACE_Null_Mutex>::instance()
#define sObjectMgr ObjectMgr::instance()
#endif