[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:
parent
648163a2e0
commit
2ca258e179
5 changed files with 38 additions and 14 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue