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://svn.code.sf.net/p/rathena/svn/trunk@16410 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
b8a9fab037
commit
dd659028a3
@ -848,9 +848,11 @@ void itemdb_read_combos(DBMap* item_combo_db) {
|
|||||||
|
|
||||||
safestrncpy(ic->script + slen, combo_out, len);
|
safestrncpy(ic->script + slen, combo_out, len);
|
||||||
|
|
||||||
if (!exists)
|
if (!exists) {
|
||||||
|
ic->nameid = items[0];
|
||||||
idb_put(item_combo_db, items[0], ic);
|
idb_put(item_combo_db, items[0], ic);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
@ -1181,8 +1183,17 @@ static int itemdb_readdb(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( db_size(item_combo_db) ) {
|
if( db_size(item_combo_db) ) {
|
||||||
|
DBIterator * iter = db_iterator(item_combo_db);
|
||||||
|
struct item_combo * ic = NULL;
|
||||||
|
int icount = 1;
|
||||||
/* non-processed entries */
|
/* 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));
|
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);
|
db_destroy(item_combo_db);
|
||||||
|
@ -147,6 +147,7 @@ struct item_group {
|
|||||||
|
|
||||||
struct item_combo {
|
struct item_combo {
|
||||||
char script[2048]; /* combo script */
|
char script[2048]; /* combo script */
|
||||||
|
short nameid;/* id of the first */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct item_data* itemdb_searchname(const char *name);
|
struct item_data* itemdb_searchname(const char *name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user