summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-12 14:44:44 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-12 14:44:44 +0000
commitd405792905f1cd657b94ee7f9f3c6db11d75826c (patch)
tree07125dddf6391686e4daccfb821bcaa9e965d021 /src/map
parent5ca687b95afe382f415ecb08e3f0c9787dc6347c (diff)
downloadhercules-d405792905f1cd657b94ee7f9f3c6db11d75826c.tar.gz
hercules-d405792905f1cd657b94ee7f9f3c6db11d75826c.tar.bz2
hercules-d405792905f1cd657b94ee7f9f3c6db11d75826c.tar.xz
hercules-d405792905f1cd657b94ee7f9f3c6db11d75826c.zip
Improved item_combo_db error message so it makes it easier to identify which item causes the error. for bugreport:6213
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16410 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/itemdb.c13
-rw-r--r--src/map/itemdb.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index f6c43b26a..cd9f9a89a 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -848,8 +848,10 @@ void itemdb_read_combos(DBMap* item_combo_db) {
safestrncpy(ic->script + slen, combo_out, len);
- if (!exists)
+ if (!exists) {
+ ic->nameid = items[0];
idb_put(item_combo_db, items[0], ic);
+ }
}
count++;
@@ -1181,8 +1183,17 @@ static int itemdb_readdb(void)
}
if( db_size(item_combo_db) ) {
+ DBIterator * iter = db_iterator(item_combo_db);
+ struct item_combo * ic = NULL;
+ int icount = 1;
/* non-processed entries */
ShowWarning("item_combo_db: There are %d unused entries in the file (combo(s) with non-available item IDs)\n",db_size(item_combo_db));
+
+ for( ic = dbi_first(iter); dbi_exists(iter); ic = dbi_next(iter) ) {
+ ShowWarning("item_combo_db(%d): (ID:%d) \"%s\" combo unused\n",icount++,ic->nameid,ic->script);
+ }
+
+ dbi_destroy(iter);
}
db_destroy(item_combo_db);
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index f84330522..75c82088b 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -147,6 +147,7 @@ struct item_group {
struct item_combo {
char script[2048]; /* combo script */
+ short nameid;/* id of the first */
};
struct item_data* itemdb_searchname(const char *name);