diff options
author | Naios <naios-dev@live.de> | 2016-07-13 21:58:50 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-07-13 22:01:14 +0200 |
commit | 58dd647a887a1f889560be561ef5a9bad0abdbdf (patch) | |
tree | bf0bc71f28d08e7fa9a96f1468770180b4bc7129 /src/server/game/Scripting/ScriptMgr.h | |
parent | db85bad1ff349d2e710de34d2a3dd8ae2a2a07a8 (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
(cherry picked from commit 445746c402485fcac60c02842d0cb5e0dd605e5c)
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 c3deab43ee6..850a979923c 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -875,6 +875,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. |