feat(Core/Modules): Preparation to implement progression-system module. (#8837)

This commit is contained in:
UltraNix
2021-11-06 14:06:12 +01:00
committed by GitHub
parent 93bbff4cca
commit 70d8b88f3b
13 changed files with 253 additions and 97 deletions

View File

@@ -278,6 +278,16 @@ int main(int argc, char** argv)
// Set process priority according to configuration settings
SetProcessPriority("server.worldserver", sConfigMgr->GetOption<int32>(CONFIG_PROCESSOR_AFFINITY, 0), sConfigMgr->GetOption<bool>(CONFIG_HIGH_PRIORITY, false));
sScriptMgr->SetScriptLoader(AddScripts);
std::shared_ptr<void> sScriptMgrHandle(nullptr, [](void*)
{
sScriptMgr->Unload();
//sScriptReloadMgr->Unload();
});
LOG_INFO("server.loading", "Initializing Scripts...");
sScriptMgr->Initialize();
// Start the databases
if (!StartDB())
return 1;
@@ -308,13 +318,6 @@ int main(int argc, char** argv)
// Loading modules configs
sConfigMgr->PrintLoadedModulesConfigs();
sScriptMgr->SetScriptLoader(AddScripts);
std::shared_ptr<void> sScriptMgrHandle(nullptr, [](void*)
{
sScriptMgr->Unload();
//sScriptReloadMgr->Unload();
});
///- Initialize the World
sSecretMgr->Initialize();
sWorld->SetInitialWorldSettings();
@@ -486,6 +489,8 @@ bool StartDB()
LOG_INFO("server.loading", "> Version DB world: %s", sWorld->GetDBVersion());
sScriptMgr->OnAfterDatabasesLoaded(loader.GetUpdateFlags());
return true;
}