From a6fda42d776920b6a4bddbf1cd3451e1a20b3e8d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 19 Sep 2017 20:26:16 +0300 Subject: Show warnings if additional item db field groups contains unknown elements. --- src/emap/itemdb.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 ++; -- cgit v1.2.3-70-g09d2