diff options
author | Naios <naios-dev@live.de> | 2016-07-13 21:58:50 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-07-13 21:58:50 +0200 |
commit | 445746c402485fcac60c02842d0cb5e0dd605e5c (patch) | |
tree | 1b44d88945e95728a1f4f930490140dcac3b6404 /src/server/game/Scripting/ScriptMgr.h | |
parent | d22569aababdc9eb09efaf558e0a1b262e3bfe79 (diff) |
Core/Scripting: Fix acquiring of references between script swaps
* Delay unloading of shared libraries to the next update tick
to prevent crashes in the destructor of the last referenced
script instance.
* Closes #17557
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index cc1b65fa593..233e56aadb2 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -876,6 +876,9 @@ class TC_GAME_API ScriptMgr /// calls for better performance (bulk changes). void SwapScriptContext(bool initialize = false); + /// Returns the context name of the static context provided by the worldserver + static std::string const& GetNameOfStaticContext(); + /// Acquires a strong module reference to the module containing the given script name, /// which prevents the shared library which contains the script from unloading. /// The shared library is lazy unloaded as soon as all references to it are released. |