mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
[CORE] implemented multiple configuration files loading
currently it's used to load the default [auth|world]server.conf.dist but you can use sConfigMgr->LoadMore to load your custom config in your modules to add/overwrite properties
This commit is contained in:
@@ -104,7 +104,15 @@ extern int main(int argc, char** argv)
|
||||
++count;
|
||||
}
|
||||
|
||||
if (!sConfigMgr->LoadInitial(configFile))
|
||||
std::string cfg_def_file=_TRINITY_REALM_CONFIG;
|
||||
cfg_def_file += ".dist";
|
||||
|
||||
if (!sConfigMgr->LoadInitial(cfg_def_file.c_str())) {
|
||||
printf("Invalid or missing default configuration file : %s\n", cfg_def_file.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!sConfigMgr->LoadMore(configFile))
|
||||
{
|
||||
printf("Invalid or missing configuration file : %s\n", configFile);
|
||||
printf("Verify that the file exists and has \'[authserver]\' written in the top of the file!\n");
|
||||
|
||||
Reference in New Issue
Block a user