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

@@ -16,6 +16,12 @@ OutdoorPvPMgr::OutdoorPvPMgr()
//sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Instantiating OutdoorPvPMgr");
}
OutdoorPvPMgr* OutdoorPvPMgr::instance()
{
static OutdoorPvPMgr instance;
return &instance;
}
void OutdoorPvPMgr::Die()
{
//sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Deleting OutdoorPvPMgr");

View File

@@ -10,7 +10,6 @@
#define OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL 1000
#include "OutdoorPvP.h"
#include <ace/Singleton.h>
class Player;
class GameObject;
@@ -27,13 +26,13 @@ struct OutdoorPvPData
// class to handle player enter / leave / areatrigger / GO use events
class OutdoorPvPMgr
{
friend class ACE_Singleton<OutdoorPvPMgr, ACE_Null_Mutex>;
private:
OutdoorPvPMgr();
~OutdoorPvPMgr() {};
public:
static OutdoorPvPMgr* instance();
// create outdoor pvp events
void InitOutdoorPvP();
@@ -93,6 +92,6 @@ class OutdoorPvPMgr
uint32 m_UpdateTimer;
};
#define sOutdoorPvPMgr ACE_Singleton<OutdoorPvPMgr, ACE_Null_Mutex>::instance()
#define sOutdoorPvPMgr OutdoorPvPMgr::instance()
#endif /*OUTDOOR_PVP_MGR_H_*/