diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/itemdb.c | 6 | ||||
-rw-r--r-- | src/plugins/db2sql.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 6fd8b166c..5fae29500 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -760,7 +760,7 @@ void itemdb_read_packages(void) { int r = 0, m = 0; data->package = &itemdb->packages[count]; - + itemdb->packages[count].id = data->nameid; itemdb->packages[count].random_list = NULL; itemdb->packages[count].must_items = NULL; @@ -814,7 +814,9 @@ void itemdb_read_packages(void) { itemdb->packages[count].random_list[r].id = data ? data->nameid : 0; itemdb->packages[count].random_list[r].qty = icount; - itemdb->packages[count].random_list[r].rate = rate; + if( (itemdb->packages[count].random_list[r].rate = rate) == 10000 ) { + ShowWarning("itemdb_read_packages: item '%s' in '%s' has 100% drop rate!! set this item as 'Random: false' or other items won't drop!!!\n",itname,config_setting_name(itg)); + } itemdb->packages[count].random_list[r].hours = expire; itemdb->packages[count].random_list[r].announce = announce == true ? 1 : 0; itemdb->packages[count].random_list[r].named = named == true ? 1 : 0; diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index c4d4adff1..8db4a006f 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -17,7 +17,7 @@ HPExport struct hplugin_info pinfo = { "DB2SQL", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? - "0.3", // Plugin version + "0.4", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; @@ -55,10 +55,10 @@ int db2sql(char** str, const char* source, int line, int scriptopt) { /* renewal has the 'matk' and 'equip_level' is now 'equip_level_min', and there is a new 'equip_level_max' field */ #ifdef RENEWAL if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`id`,`name_english`,`name_japanese`,`type`,`price_buy`,`price_sell`,`weight`,`atk`,`matk`,`defence`,`range`,`slots`,`equip_jobs`,`equip_upper`,`equip_genders`,`equip_locations`,`weapon_level`,`equip_level_min`,`equip_level_max`,`refineable`,`view`,`script`,`equip_script`,`unequip_script`) VALUES ('%u',?,?,'%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',?,?,?)",iMap->item_db_re_db, - it->nameid,it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11+offset],NULL,0),atoi(str[12+offset]),atoi(str[13+offset]),atoi(str[14+offset]),it->wlv,it->elv,it->elvmax,atoi(str[17+offset]),it->look) ) + it->nameid,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->matk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11+offset],NULL,0),atoi(str[12+offset]),atoi(str[13+offset]),atoi(str[14+offset]),it->wlv,it->elv,it->elvmax,atoi(str[17+offset]),it->look) ) #else if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`id`,`name_english`,`name_japanese`,`type`,`price_buy`,`price_sell`,`weight`,`atk`,`defence`,`range`,`slots`,`equip_jobs`,`equip_upper`,`equip_genders`,`equip_locations`,`weapon_level`,`equip_level`,`refineable`,`view`,`script`,`equip_script`,`unequip_script`) VALUES ('%u',?,?,'%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u',?,?,?)",iMap->item_db_db, - it->nameid,it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11],NULL,0),atoi(str[12]),atoi(str[13]),atoi(str[14]),it->wlv,it->elv,atoi(str[17]),it->look) ) + it->nameid,it->flag.delay_consume?IT_DELAYCONSUME:it->type,it->value_buy,it->value_sell,it->weight,it->atk,it->def,it->range,it->slot,(unsigned int)strtoul(str[11],NULL,0),atoi(str[12]),atoi(str[13]),atoi(str[14]),it->wlv,it->elv,atoi(str[17]),it->look) ) #endif SqlStmt_ShowDebug(stmt); else { |