diff options
author | Seyden <saiifii@live.de> | 2021-10-22 12:51:45 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2021-10-22 12:52:37 +0200 |
commit | 8f097e4425d182c03b26d847c0537207d9f3cd2e (patch) | |
tree | d9d6233d0cd2d75978a97ab8b3c73429886322a4 /src/server/game/Scripting/ScriptMgr.h | |
parent | 972105183a16c9ac8c43f379cce4acc8bf764cd8 (diff) |
Core/Scripts: Implement script name reloading
* Authored by Seyden
* Co-authored by Naios
* We thank Shauren for your helpful feedback
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 9b4bd01e2b6..863661022af 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -901,6 +901,12 @@ class TC_GAME_API ScriptMgr _script_loader_callback = script_loader_callback; } + public: /* Updating script ids */ + /// Inform the ScriptMgr that an entity has a changed script id + void NotifyScriptIDUpdate(); + /// Synchronize all scripts with their current ids + void SyncScripts(); + public: /* Script contexts */ /// Set the current script context, which allows the ScriptMgr /// to accept new scripts in this context. @@ -989,10 +995,12 @@ class TC_GAME_API ScriptMgr public: /* CreatureScript */ + bool CanCreateCreatureAI(uint32 scriptId) const; CreatureAI* GetCreatureAI(Creature* creature); public: /* GameObjectScript */ + bool CanCreateGameObjectAI(uint32 scriptId) const; GameObjectAI* GetGameObjectAI(GameObject* go); public: /* AreaTriggerScript */ @@ -1130,6 +1138,7 @@ class TC_GAME_API ScriptMgr public: /* AreaTriggerEntityScript */ + bool CanCreateAreaTriggerAI(uint32 scriptId) const; AreaTriggerAI* GetAreaTriggerAI(AreaTrigger* areaTrigger); public: /* ConversationScript */ @@ -1152,6 +1161,7 @@ class TC_GAME_API ScriptMgr private: uint32 _scriptCount; + bool _scriptIdUpdated; ScriptLoaderCallbackType _script_loader_callback; |