diff options
author | shennetsind <ind@henn.et> | 2013-06-24 17:40:54 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-24 17:40:54 -0300 |
commit | 5b40d0c2937c2fe4f8e133271d05602543d86277 (patch) | |
tree | a8af29674a49faa9ab2f260172d713d4692c3fb7 /src/plugins/db2sql.c | |
parent | 02bb58d320f16ddc30ac3d1e6508cf08997f583a (diff) | |
download | hercules-5b40d0c2937c2fe4f8e133271d05602543d86277.tar.gz hercules-5b40d0c2937c2fe4f8e133271d05602543d86277.tar.bz2 hercules-5b40d0c2937c2fe4f8e133271d05602543d86277.tar.xz hercules-5b40d0c2937c2fe4f8e133271d05602543d86277.zip |
Fixed db2sql
Wasn't taking in account the delay_consume flag which actually means the item type is 11 not 2.
Also added a extra warning in the item packages parser.
Special Thanks to ossi0110 for bringing this up.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/plugins/db2sql.c')
-rw-r--r-- | src/plugins/db2sql.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |