summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorSusu <bruant.bastien@gmail.com>2013-07-29 16:07:06 +0200
committerSusu <bruant.bastien@gmail.com>2013-07-29 16:07:06 +0200
commit328525e468c35e8b266b160adbf09792faa64669 (patch)
treee0e393585bc5b831a0a53ec1c8d89d7401f2ce65 /src/map/itemdb.c
parentb7171479a47490ff80bf04849f763158d6d96fac (diff)
parent15a3f6a5270943af44eb82fa01203464ce396aec (diff)
downloadhercules-328525e468c35e8b266b160adbf09792faa64669.tar.gz
hercules-328525e468c35e8b266b160adbf09792faa64669.tar.bz2
hercules-328525e468c35e8b266b160adbf09792faa64669.tar.xz
hercules-328525e468c35e8b266b160adbf09792faa64669.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
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();