mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -8,9 +8,6 @@
|
||||
#define SC_SCRIPTMGR_H
|
||||
|
||||
#include "Common.h"
|
||||
#include <ace/Singleton.h>
|
||||
#include <atomic>
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "DBCStores.h"
|
||||
#include "QuestDef.h"
|
||||
@@ -21,6 +18,7 @@
|
||||
#include "DynamicObject.h"
|
||||
#include "ArenaTeam.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include <atomic>
|
||||
|
||||
class AuctionHouseObject;
|
||||
class AuraScript;
|
||||
@@ -1171,13 +1169,9 @@ public:
|
||||
virtual void OnStop(uint16 /*EventID*/) { }
|
||||
};
|
||||
|
||||
// Placed here due to ScriptRegistry::AddScript dependency.
|
||||
#define sScriptMgr ACE_Singleton<ScriptMgr, ACE_Null_Mutex>::instance()
|
||||
|
||||
// Manages registration, loading, and execution of scripts.
|
||||
class ScriptMgr
|
||||
{
|
||||
friend class ACE_Singleton<ScriptMgr, ACE_Null_Mutex>;
|
||||
friend class ScriptObject;
|
||||
|
||||
private:
|
||||
@@ -1187,6 +1181,7 @@ class ScriptMgr
|
||||
|
||||
public: /* Initialization */
|
||||
|
||||
static ScriptMgr* instance();
|
||||
void Initialize();
|
||||
void LoadDatabase();
|
||||
void FillSpellSummary();
|
||||
@@ -1529,6 +1524,8 @@ class ScriptMgr
|
||||
std::atomic<long> _scheduledScripts;
|
||||
};
|
||||
|
||||
#define sScriptMgr ScriptMgr::instance()
|
||||
|
||||
template<class TScript>
|
||||
class ScriptRegistry
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user