summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-05-27 13:07:04 +0200
committerGitHub <noreply@github.com>2020-05-27 13:07:04 +0200
commitf1755315045b90ae1bf752c772e9d4bc747c8671 (patch)
treef796261c6623e663ae0ffd5027a6f099906dc806 /src/map/map.c
parent7b79d5d08fc43cfab1d909e107e958daf739d521 (diff)
parentfeaae9bc9244ee3c3f8968980b17c69d0ccd710f (diff)
downloadhercules-f1755315045b90ae1bf752c772e9d4bc747c8671.tar.gz
hercules-f1755315045b90ae1bf752c772e9d4bc747c8671.tar.bz2
hercules-f1755315045b90ae1bf752c772e9d4bc747c8671.tar.xz
hercules-f1755315045b90ae1bf752c772e9d4bc747c8671.zip
Merge pull request #2720 from Kenpachi2k13/split_mapreg_table
Split mapreg table and refactor mapreg code
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/map/map.c b/src/map/map.c
index f66f40dfc..63d05c1c0 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -4459,7 +4459,6 @@ static bool inter_config_read_connection(const char *filename, const struct conf
static bool inter_config_read_database_names(const char *filename, const struct config_t *config, bool imported)
{
const struct config_setting_t *setting = NULL;
- bool retval = true;
nullpo_retr(false, filename);
nullpo_retr(false, config);
@@ -4477,16 +4476,14 @@ static bool inter_config_read_database_names(const char *filename, const struct
libconfig->setting_lookup_mutable_string(setting, "npc_barter_data_db", map->npc_barter_data_db, sizeof(map->npc_barter_data_db));
libconfig->setting_lookup_mutable_string(setting, "npc_expanded_barter_data_db", map->npc_expanded_barter_data_db, sizeof(map->npc_expanded_barter_data_db));
- if (!mapreg->config_read(filename, setting, imported))
- retval = false;
-
if ((setting = libconfig->lookup(config, "inter_configuration/database_names/registry")) == NULL) {
if (imported)
- return retval;
+ return true;
ShowError("inter_config_read: inter_configuration/database_names/registry was not found in %s!\n", filename);
return false;
}
- return retval;
+
+ return mapreg->config_read_registry(filename, setting, imported);
}
/*=======================================