mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
feat(Core/Scripts): split the huge scriptloader into smaller pieces (#5346)
* feat(Core/Scripts): split the huge scriptloader into smaller pieces
* AddSC_swamp_of_sorrows del
* 1
* add mod info
* 1
* 039f0e0faa
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -1414,11 +1414,20 @@ public: /* Initialization */
|
||||
void FillSpellSummary();
|
||||
void CheckIfScriptsInDatabaseExist();
|
||||
|
||||
const char* ScriptsVersion() const { return "Integrated Trinity Scripts"; }
|
||||
const char* ScriptsVersion() const { return "Integrated Azeroth Scripts"; }
|
||||
|
||||
void IncrementScriptCount() { ++_scriptCount; }
|
||||
uint32 GetScriptCount() const { return _scriptCount; }
|
||||
|
||||
typedef void(*ScriptLoaderCallbackType)();
|
||||
|
||||
/// Sets the script loader callback which is invoked to load scripts
|
||||
/// (Workaround for circular dependency game <-> scripts)
|
||||
void SetScriptLoader(ScriptLoaderCallbackType script_loader_callback)
|
||||
{
|
||||
_script_loader_callback = script_loader_callback;
|
||||
}
|
||||
|
||||
public: /* Unloading */
|
||||
void Unload();
|
||||
|
||||
@@ -1873,6 +1882,8 @@ private:
|
||||
|
||||
//atomic op counter for active scripts amount
|
||||
std::atomic<long> _scheduledScripts;
|
||||
|
||||
ScriptLoaderCallbackType _script_loader_callback;
|
||||
};
|
||||
|
||||
#define sScriptMgr ScriptMgr::instance()
|
||||
|
||||
Reference in New Issue
Block a user