aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptSystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Scripting/ScriptSystem.h')
-rw-r--r--src/server/game/Scripting/ScriptSystem.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h
index 52401502c83..27a20f009a6 100644
--- a/src/server/game/Scripting/ScriptSystem.h
+++ b/src/server/game/Scripting/ScriptSystem.h
@@ -4,6 +4,7 @@
#ifndef SC_SYSTEM_H
#define SC_SYSTEM_H
+#include <ace/Singleton.h>
#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available
@@ -51,13 +52,10 @@ struct StringTextData
class SystemMgr
{
- public:
-
- SystemMgr();
+ friend class ACE_Singleton<SystemMgr, ACE_Null_Mutex>;
+ SystemMgr() {}
~SystemMgr() {}
-
- static SystemMgr& Instance();
-
+ public:
//Maps and lists
typedef UNORDERED_MAP<int32, StringTextData> TextDataMap;
typedef UNORDERED_MAP<uint32, std::vector<ScriptPointMove> > PointMoveMap;
@@ -97,6 +95,6 @@ class SystemMgr
PointMoveMap m_mPointMoveMap; //coordinates for waypoints
};
-#define sScriptSystemMgr SystemMgr::Instance()
+#define sScriptSystemMgr (*ACE_Singleton<SystemMgr, ACE_Null_Mutex>::instance())
#endif