summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-29 10:39:36 -0300
committershennetsind <ind@henn.et>2013-07-29 10:39:36 -0300
commit1caae981b4f000b67bdd0b118fb76797c2bfa06c (patch)
treeafcf1f2881cfc88029fab7d0fdc161d0e04df9d7 /src/map/itemdb.c
parent2eab181cece04d8c6a79f9d1a3ff74343cd3ae76 (diff)
downloadhercules-1caae981b4f000b67bdd0b118fb76797c2bfa06c.tar.gz
hercules-1caae981b4f000b67bdd0b118fb76797c2bfa06c.tar.bz2
hercules-1caae981b4f000b67bdd0b118fb76797c2bfa06c.tar.xz
hercules-1caae981b4f000b67bdd0b118fb76797c2bfa06c.zip
Ultimate Item DB Update
http://hercules.ws/board/topic/1778-ultimate-item-db-update/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 0ea97ed47..e2d2621f8 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1920,15 +1920,21 @@ int itemdb_uid_load() {
*------------------------------------*/
static void itemdb_read(void) {
int i;
+ DBData prev;
if (iMap->db_use_sql_item_db)
itemdb_read_sqldb();
else
itemdb_readdb();
- for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i )
- if( itemdb_array[i] )
- strdb_put(itemdb->names, itemdb_array[i]->name, itemdb_array[i]);
+ for( i = 0; i < ARRAYLENGTH(itemdb_array); ++i ) {
+ if( itemdb_array[i] ) {
+ if( itemdb->names->put(itemdb->names,DB->str2key(itemdb_array[i]->name),DB->ptr2data(itemdb_array[i]),&prev) ) {
+ struct item_data *data = DB->data2ptr(&prev);
+ ShowError("itemdb_read: duplicate AegisName '%s' in item ID %d and %d\n",itemdb_array[i]->name,itemdb_array[i]->nameid,data->nameid);
+ }
+ }
+ }
itemdb_read_combos();
itemdb->read_groups();