mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
feat(Core/Config): implement loading files optional (#8198)
This commit is contained in:
@@ -195,14 +195,11 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
// Add file and args in config
|
||||
sConfigMgr->Configure(configFile, std::vector<std::string>(argv, argv + argc), CONFIG_FILE_LIST);
|
||||
sConfigMgr->Configure(configFile, { argv, argv + argc }, CONFIG_FILE_LIST);
|
||||
|
||||
if (!sConfigMgr->LoadAppConfigs())
|
||||
return 1;
|
||||
|
||||
// Loading modules configs
|
||||
sConfigMgr->LoadModulesConfigs();
|
||||
|
||||
std::shared_ptr<Acore::Asio::IoContext> ioContext = std::make_shared<Acore::Asio::IoContext>();
|
||||
|
||||
// Init all logs
|
||||
@@ -318,8 +315,8 @@ int main(int argc, char** argv)
|
||||
|
||||
Acore::Module::SetEnableModulesList(AC_MODULES_LIST);
|
||||
|
||||
// Loading modules configs
|
||||
sConfigMgr->PrintLoadedModulesConfigs();
|
||||
// Loading modules configs before scripts
|
||||
sConfigMgr->LoadModulesConfigs();
|
||||
|
||||
///- Initialize the World
|
||||
sSecretMgr->Initialize();
|
||||
@@ -457,7 +454,7 @@ bool StartDB()
|
||||
return false;
|
||||
|
||||
///- Get the realm Id from the configuration file
|
||||
realm.Id.Realm = sConfigMgr->GetIntDefault("RealmID", 0);
|
||||
realm.Id.Realm = sConfigMgr->GetOption<uint32>("RealmID", 0);
|
||||
if (!realm.Id.Realm)
|
||||
{
|
||||
LOG_ERROR("server.worldserver", "Realm ID not defined in configuration file");
|
||||
|
||||
Reference in New Issue
Block a user