summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-19 20:26:16 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-19 20:26:16 +0300
commita6fda42d776920b6a4bddbf1cd3451e1a20b3e8d (patch)
treec19bb641a46efa6afe1faa72f7997a7eacd30561 /src
parenta42e660b76029df73830840c0e8005d3d465f4d1 (diff)
downloadevol-hercules-a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d.tar.gz
evol-hercules-a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d.tar.bz2
evol-hercules-a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d.tar.xz
evol-hercules-a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d.zip
Show warnings if additional item db field groups contains unknown elements.s20170925
Diffstat (limited to 'src')
-rw-r--r--src/emap/itemdb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/emap/itemdb.c b/src/emap/itemdb.c
index dc4fd2f..eefb4b1 100644
--- a/src/emap/itemdb.c
+++ b/src/emap/itemdb.c
@@ -146,7 +146,10 @@ void eitemdb_readdb_additional_fields_pre(int *itemid,
{
const char *name = config_setting_name(it2);
if (name && strncmp(name, "id", 2) && strncmp(name, "Id", 2))
+ {
+ ShowWarning("Unknown field AllowCards for item %s\n", item->name);
continue;
+ }
const int val = libconfig->setting_get_int(it2);
VECTOR_ENSURE(data->allowedCards, 1, 1);
@@ -177,7 +180,10 @@ void eitemdb_readdb_additional_fields_pre(int *itemid,
{
const char *name = config_setting_name(it2);
if (name && strncmp(name, "id", 2) && strncmp(name, "Id", 2))
+ {
+ ShowWarning("Unknown field AllowAmmo for item %s\n", item->name);
continue;
+ }
VECTOR_ENSURE(data->allowedAmmo, 1, 1);
VECTOR_PUSH(data->allowedAmmo, atoi(name + 2));
cnt ++;