summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorGuilherme Menaldo <guilherme.menaldo@outlook.com>2019-10-01 22:57:09 -0300
committerGuilherme Menaldo <guilherme.menaldo@outlook.com>2019-10-05 16:42:54 -0300
commit7d25827001493a82a8f75cfc6a0b956164b44f05 (patch)
tree911eff2691b6804c6a971bd86234313ee1af7dcf /src/map/clif.c
parentd026e28fd78f60dfa21da381f17f2a8cc9ae3d11 (diff)
downloadhercules-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/clif.c')
-rw-r--r--src/map/clif.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index f6caa502e..f8e2b63a2 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -19784,7 +19784,8 @@ static void clif_cashshop_db(void)
{
struct config_t cashshop_conf;
struct config_setting_t *cashshop = NULL, *cats = NULL;
- const char *config_filename = "db/cashshop_db.conf"; // FIXME hardcoded name
+ char config_filename[256];
+ libconfig->format_db_path("cashshop_db.conf", config_filename, sizeof(config_filename));
int i, item_count_t = 0;
for( i = 0; i < CASHSHOP_TAB_MAX; i++ ) {
CREATE(clif->cs.data[i], struct hCSData *, 1);
@@ -21055,7 +21056,8 @@ static bool clif_parse_roulette_db(void)
{
struct config_t roulette_conf;
struct config_setting_t *roulette = NULL, *levels = NULL;
- const char *config_filename = "db/roulette_db.conf"; // FIXME hardcoded name
+ char config_filename[256];
+ libconfig->format_db_path("roulette_db.conf", config_filename, sizeof(config_filename));
int i, j, item_count_t = 0;
for( i = 0; i < MAX_ROULETTE_LEVEL; i++ ) {
@@ -22539,7 +22541,8 @@ static bool clif_parse_attendance_db(void)
{
struct config_t attendance_conf;
struct config_setting_t *attendance = NULL, *it = NULL;
- const char *config_filename = "db/attendance_db.conf"; // FIXME hardcoded name
+ char config_filename[256];
+ libconfig->format_db_path("attendance_db.conf", config_filename, sizeof(config_filename));
int i = 0;
if (!libconfig->load_file(&attendance_conf, config_filename))