feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
parent
16b45bf334
commit
4a8f1de538
88 changed files with 486 additions and 250 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue