From 9cc97f226d79e8e0bbe1fdc386ec9f065c0a2226 Mon Sep 17 00:00:00 2001 From: Naios Date: Fri, 11 Mar 2016 17:09:26 +0100 Subject: Core/Game: Rewrote the ScriptMgr to support script reloading. * Finally this commit enables dynamic script hotswapping and finished the PR #15671. * Split the storage layout to use optimized storages for database bound and unbound scripts. * Add several unload workers to reload scripts correctly -> Requires further investigation. * Fixes memory leaks in ScriptMgr when dropping invalid scripts. * Fixes VehicleScripts * Makes OutdoorPvP scripts reloadable * Makes InstanceMapScripts reloadable * Makes CommandScripts reloadable --- src/server/game/Spells/SpellScript.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/server/game/Spells/SpellScript.h') diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index aca3e074b9a..97bbdf14231 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -22,6 +22,7 @@ #include "SharedDefines.h" #include "SpellAuraDefines.h" #include "Spell.h" +#include "ScriptReloadMgr.h" #include class Unit; @@ -105,6 +106,16 @@ class TC_GAME_API _SpellScript uint8 m_currentScriptState; std::string const* m_scriptName; uint32 m_scriptSpellId; + + private: + +#ifdef TRINITY_API_USE_DYNAMIC_LINKING + + // Strong reference to keep the binary code loaded + std::shared_ptr m_moduleReference; + +#endif // #ifndef TRINITY_API_USE_DYNAMIC_LINKING + public: // // SpellScript/AuraScript interface base -- cgit v1.2.3