aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Texts/CreatureTextMgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Texts/CreatureTextMgr.h')
-rw-r--r--src/server/game/Texts/CreatureTextMgr.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h
index 28722ae70f4..d1db202ca68 100644
--- a/src/server/game/Texts/CreatureTextMgr.h
+++ b/src/server/game/Texts/CreatureTextMgr.h
@@ -82,11 +82,17 @@ typedef std::unordered_map<uint64, CreatureTextRepeatGroup> CreatureTextRepeatMa
class CreatureTextMgr
{
- friend class ACE_Singleton<CreatureTextMgr, ACE_Null_Mutex>;
- CreatureTextMgr() { };
+ private:
+ CreatureTextMgr() { };
+ ~CreatureTextMgr() { };
public:
- ~CreatureTextMgr() { };
+ static CreatureTextMgr* instance()
+ {
+ static CreatureTextMgr* instance = new CreatureTextMgr();
+ return instance;
+ }
+
void LoadCreatureTexts();
void LoadCreatureTextLocales();
CreatureTextMap const& GetTextMap() const { return mTextMap; }
@@ -113,7 +119,7 @@ class CreatureTextMgr
LocaleCreatureTextMap mLocaleTextMap;
};
-#define sCreatureTextMgr ACE_Singleton<CreatureTextMgr, ACE_Null_Mutex>::instance()
+#define sCreatureTextMgr CreatureTextMgr::instance()
template<class Builder>
class CreatureTextLocalizer