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:42:28 +0200 | 
| commit | eaf102b3c59232af9371839c10b6b3e8368b9cfd (patch) | |
| tree | a6b290844d65f5cda4b46de4117e784470a815c5 /src/server/game/Instances/InstanceScript.h | |
| parent | 3123c278b9f7dca36d4edcafc95f40f37ec3e4eb (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
(cherry picked from commit 9cc97f226d79e8e0bbe1fdc386ec9f065c0a2226)
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 949cdf5abcb..3814afe2f4b 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -36,6 +36,7 @@ class Unit;  class Player;  class GameObject;  class Creature; +class ModuleReference;  enum EncounterFrameType  { @@ -137,7 +138,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() { } @@ -289,6 +290,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>  | 
