diff options
| author | Naios <naios-dev@live.de> | 2016-03-11 17:09:26 +0100 |
|---|---|---|
| committer | Naios <naios-dev@live.de> | 2016-04-11 21:14:00 +0200 |
| commit | 9cc97f226d79e8e0bbe1fdc386ec9f065c0a2226 (patch) | |
| tree | 9a08ab0926432f1be8fad2da5152bd51a3dd64a8 /src/server/game/Instances/InstanceScript.h | |
| parent | bc0f2b6e5acd24f414508edb3b826a20a12bce62 (diff) | |
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
Diffstat (limited to 'src/server/game/Instances/InstanceScript.h')
| -rw-r--r-- | src/server/game/Instances/InstanceScript.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 2bb2f14ca12..1611f3c290f 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -37,6 +37,7 @@ class Unit; class Player; class GameObject; class Creature; +class ModuleReference; enum EncounterFrameType { @@ -141,7 +142,7 @@ typedef std::map<uint32 /*entry*/, uint32 /*type*/> ObjectInfoMap; class TC_GAME_API InstanceScript : public ZoneScript { public: - explicit InstanceScript(Map* map) : instance(map), completedEncounters(0) { } + explicit InstanceScript(Map* map); virtual ~InstanceScript() { } @@ -296,6 +297,11 @@ class TC_GAME_API InstanceScript : public ZoneScript ObjectInfoMap _gameObjectInfo; ObjectGuidMap _objectGuids; uint32 completedEncounters; // completed encounter mask, bit indexes are DungeonEncounter.dbc boss numbers, used for packets + + #ifdef TRINITY_API_USE_DYNAMIC_LINKING + // Strong reference to the associated script module + std::shared_ptr<ModuleReference> module_reference; + #endif // #ifndef TRINITY_API_USE_DYNAMIC_LINKING }; template<class AI, class T> |
