From 1f5161a2bd3c7934373146d8cac3c131536758ba Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Nov 2013 03:32:45 -0200 Subject: 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 --- src/map/pc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index d597ccf9f..317e4e476 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8707,6 +8707,12 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) return 0; } + /* won't fail from this point onwards */ + if( id->flag.bindonequip && !sd->status.inventory[n].bound ) { + sd->status.inventory[n].bound = (unsigned char)IBT_CHARACTER; + clif->notify_bounditem(sd,n); + } + if(pos == EQP_ACC) { //Accesories should only go in one of the two, pos = req_pos&EQP_ACC; if (pos == EQP_ACC) //User specified both slots.. -- cgit v1.2.3-60-g2f50