summaryrefslogtreecommitdiff
path: root/src/plugins/db2sql.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-15 03:32:45 -0200
committershennetsind <ind@henn.et>2013-11-15 03:32:45 -0200
commit1f5161a2bd3c7934373146d8cac3c131536758ba (patch)
treee788177258e61e81b5d20dc7eb43c2d7c6cd8ff5 /src/plugins/db2sql.c
parentcdf6dc90768b1b524c78e3a172c7a844dd88a943 (diff)
downloadhercules-1f5161a2bd3c7934373146d8cac3c131536758ba.tar.gz
hercules-1f5161a2bd3c7934373146d8cac3c131536758ba.tar.bz2
hercules-1f5161a2bd3c7934373146d8cac3c131536758ba.tar.xz
hercules-1f5161a2bd3c7934373146d8cac3c131536758ba.zip
Official Item BindOnEquip Support
Implements the 'BindOnEquip' item db field which determines whether the piece of equipment should bind to the character upon being equipped. When a character tries to equip such a item for the first time a dialog shows up asking the character to confirm whether to equip the item or not, and notifying the character that by equipping the item it will become bound to the character, and therefore unable to be used by another character. Special Thanks to Beret for all the information, Haruna for testing. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/plugins/db2sql.c')
-rw-r--r--src/plugins/db2sql.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 169aa8693..b3d389527 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -75,8 +75,8 @@ int db2sql(config_setting_t *entry, int n, const char *source) {
upper = ui32;
- fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%s','%s','%s');\n",
- tosql.db_name,it->nameid,e_name,e_jname,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,job,upper,it->sex,it->equip,it->wlv,it->elv,it->elvmax,it->flag.no_refine?0:1,it->look,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:"");
+ fprintf(tosql.fp,"REPLACE INTO `%s` VALUES ('%u','%s','%s','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%u','%s','%s','%s');\n",
+ tosql.db_name,it->nameid,e_name,e_jname,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,job,upper,it->sex,it->equip,it->wlv,it->elv,it->elvmax,it->flag.no_refine?0:1,it->look,it->flag.bindonequip?1:0,it->script?tosql.buf[0].p:"",it->equip_script?tosql.buf[1].p:"",it->unequip_script?tosql.buf[2].p:"");
}
return it?it->nameid:0;
@@ -109,6 +109,7 @@ void totable(void) {
" `equip_level_max` smallint(5) unsigned DEFAULT NULL,\n"
" `refineable` tinyint(1) unsigned DEFAULT NULL,\n"
" `view` smallint(3) unsigned DEFAULT NULL,\n"
+ " `bindonequip` tinyint(1) unsigned DEFAULT NULL,\n"
" `script` text,\n"
" `equip_script` text,\n"
" `unequip_script` text,\n"