diff options
author | Guilherme Menaldo <guilherme.menaldo@outlook.com> | 2019-10-01 22:57:09 -0300 |
---|---|---|
committer | Guilherme Menaldo <guilherme.menaldo@outlook.com> | 2019-10-05 16:42:54 -0300 |
commit | 7d25827001493a82a8f75cfc6a0b956164b44f05 (patch) | |
tree | 911eff2691b6804c6a971bd86234313ee1af7dcf /src/map/pc.c | |
parent | d026e28fd78f60dfa21da381f17f2a8cc9ae3d11 (diff) | |
download | hercules-7d25827001493a82a8f75cfc6a0b956164b44f05.tar.gz hercules-7d25827001493a82a8f75cfc6a0b956164b44f05.tar.bz2 hercules-7d25827001493a82a8f75cfc6a0b956164b44f05.tar.xz hercules-7d25827001493a82a8f75cfc6a0b956164b44f05.zip |
Dehardcodes db files base path so the db folder can be easily moved
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 2cefa7674..3192690eb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -11533,12 +11533,9 @@ static bool pc_read_exp_db(void) struct config_t exp_db_conf; struct config_setting_t *edb = NULL; int entry_count = 0; - -#ifdef RENEWAL - const char *config_filename = "db/re/exp_group_db.conf"; -#else - const char *config_filename = "db/pre-re/exp_group_db.conf"; -#endif + char config_filename[256]; + + libconfig->format_db_path(DBPATH"exp_group_db.conf", config_filename, sizeof(config_filename)); if (!libconfig->load_file(&exp_db_conf, config_filename)) return false; |