diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-19 20:26:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-19 20:26:16 +0300 |
commit | a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d (patch) | |
tree | c19bb641a46efa6afe1faa72f7997a7eacd30561 | |
parent | a42e660b76029df73830840c0e8005d3d465f4d1 (diff) | |
download | plugin-a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d.tar.gz plugin-a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d.tar.bz2 plugin-a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d.tar.xz plugin-a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d.zip |
Show warnings if additional item db field groups contains unknown elements.s20170925
-rw-r--r-- | src/emap/itemdb.c | 6 |
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 ++; |