diff options
| author | Naios <naios-dev@live.de> | 2016-03-11 19:41:10 +0100 |
|---|---|---|
| committer | Naios <naios-dev@live.de> | 2016-03-11 20:03:12 +0100 |
| commit | b7f936891aeb86eeb4eb67caa78e672858aa1e20 (patch) | |
| tree | 9a436108fc01da66aaa90ae062bd3d56fc0c37d0 /src/server/game/AI/SmartScripts | |
| parent | 3a4ec8bcbee91e2ad03d4f9e421f45df14b1acac (diff) | |
Core/Game: Move singleton instances into compilation units
* Fixes issues when building shared libraries
(prevents gcc and clang from providing several instance)
(cherry picked from commit 329225b40d110bed634f8cd0a1ab5c6dc7bbbdd1)
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 3fe6fcdb4ae..ba1738a523b 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -27,6 +27,12 @@ #include "SmartScriptMgr.h" +SmartWaypointMgr* SmartWaypointMgr::instance() +{ + static SmartWaypointMgr instance; + return &instance; +} + void SmartWaypointMgr::LoadFromDB() { uint32 oldMSTime = getMSTime(); @@ -98,6 +104,12 @@ SmartWaypointMgr::~SmartWaypointMgr() } } +SmartAIMgr* SmartAIMgr::instance() +{ + static SmartAIMgr instance; + return &instance; +} + void SmartAIMgr::LoadSmartAIFromDB() { LoadHelperStores(); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index d60834c9fef..748792b9b42 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1447,11 +1447,7 @@ class SmartWaypointMgr ~SmartWaypointMgr(); public: - static SmartWaypointMgr* instance() - { - static SmartWaypointMgr instance; - return &instance; - } + static SmartWaypointMgr* instance(); void LoadFromDB(); @@ -1483,11 +1479,7 @@ class SmartAIMgr ~SmartAIMgr() { } public: - static SmartAIMgr* instance() - { - static SmartAIMgr instance; - return &instance; - } + static SmartAIMgr* instance(); void LoadSmartAIFromDB(); |
