mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
feat(Core/Config): loading modules configs before loading scripts (#9653)
This commit is contained in:
@@ -360,7 +360,7 @@ std::string const ConfigMgr::GetConfigPath()
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConfigMgr::Configure(std::string const& initFileName, std::vector<std::string> args, std::string const& modulesConfigList /*= ""*/)
|
||||
void ConfigMgr::Configure(std::string const& initFileName, std::vector<std::string> args, std::string_view modulesConfigList /*= {}*/)
|
||||
{
|
||||
_filename = initFileName;
|
||||
_args = std::move(args);
|
||||
|
||||
@@ -33,7 +33,7 @@ class ConfigMgr
|
||||
public:
|
||||
bool LoadAppConfigs(bool isReload = false);
|
||||
bool LoadModulesConfigs(bool isReload = false, bool isNeedPrintInfo = true);
|
||||
void Configure(std::string const& initFileName, std::vector<std::string> args, std::string const& modulesConfigList = "");
|
||||
void Configure(std::string const& initFileName, std::vector<std::string> args, std::string_view modulesConfigList = {});
|
||||
|
||||
static ConfigMgr* instance();
|
||||
|
||||
|
||||
@@ -274,6 +274,9 @@ 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));
|
||||
|
||||
// Loading modules configs before scripts
|
||||
sConfigMgr->LoadModulesConfigs();
|
||||
|
||||
sScriptMgr->SetScriptLoader(AddScripts);
|
||||
sScriptMgr->SetModulesLoader(AddModulesScripts);
|
||||
|
||||
@@ -315,9 +318,6 @@ int main(int argc, char** argv)
|
||||
|
||||
Acore::Module::SetEnableModulesList(AC_MODULES_LIST);
|
||||
|
||||
// Loading modules configs before scripts
|
||||
sConfigMgr->LoadModulesConfigs();
|
||||
|
||||
///- Initialize the World
|
||||
sSecretMgr->Initialize();
|
||||
sWorld->SetInitialWorldSettings();
|
||||
|
||||
Reference in New Issue
Block a user