mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -597,6 +597,12 @@ ConditionMgr::~ConditionMgr()
|
||||
Clean();
|
||||
}
|
||||
|
||||
ConditionMgr* ConditionMgr::instance()
|
||||
{
|
||||
static ConditionMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
ConditionList ConditionMgr::GetConditionReferences(uint32 refId)
|
||||
{
|
||||
ConditionList conditions;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include "Errors.h"
|
||||
#include <ace/Singleton.h>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
@@ -229,13 +228,13 @@ typedef std::map<uint32, ConditionList> ConditionReferenceContainer;//only used
|
||||
|
||||
class ConditionMgr
|
||||
{
|
||||
friend class ACE_Singleton<ConditionMgr, ACE_Null_Mutex>;
|
||||
|
||||
private:
|
||||
ConditionMgr();
|
||||
~ConditionMgr();
|
||||
|
||||
public:
|
||||
static ConditionMgr* instance();
|
||||
|
||||
void LoadConditions(bool isReload = false);
|
||||
bool isConditionTypeValid(Condition* cond);
|
||||
ConditionList GetConditionReferences(uint32 refId);
|
||||
@@ -271,6 +270,6 @@ class ConditionMgr
|
||||
SmartEventConditionContainer SmartEventConditionStore;
|
||||
};
|
||||
|
||||
#define sConditionMgr ACE_Singleton<ConditionMgr, ACE_Null_Mutex>::instance()
|
||||
#define sConditionMgr ConditionMgr::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user