From 7d25827001493a82a8f75cfc6a0b956164b44f05 Mon Sep 17 00:00:00 2001 From: Guilherme Menaldo Date: Tue, 1 Oct 2019 22:57:09 -0300 Subject: Dehardcodes db files base path so the db folder can be easily moved --- src/map/pc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/map/pc.c') 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; -- cgit v1.2.3-60-g2f50