summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-03-21 00:16:08 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-03-21 00:16:08 +0800
commitd642604583c9dfcbee525042498b38c312a3d097 (patch)
tree7a9df147ef6e604421b05b800d8a9e6fb96ac249
parent81809c70483a1046f64d25ef4ad88c850ff6a0a2 (diff)
downloadhercules-d642604583c9dfcbee525042498b38c312a3d097.tar.gz
hercules-d642604583c9dfcbee525042498b38c312a3d097.tar.bz2
hercules-d642604583c9dfcbee525042498b38c312a3d097.tar.xz
hercules-d642604583c9dfcbee525042498b38c312a3d097.zip
Fixed Bug #7131
-where 'disable_items' is not working properly when force unequip/equip script command is used. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
-rw-r--r--src/map/pc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index bdf59fce4..4bd66a67c 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8415,7 +8415,7 @@ int pc_load_combo(struct map_session_data *sd) {
*------------------------------------------*/
int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
{
- int i,pos,flag=0;
+ int i,pos,flag=0,iflag;
struct item_data *id;
nullpo_ret(sd);
@@ -8566,6 +8566,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
}
pc_checkallowskill(sd); //Check if status changes should be halted.
+ iflag = sd->npc_item_flag;
/* check for combos (MUST be before status_calc_pc) */
if ( id ) {
@@ -8608,6 +8609,8 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
}
}
}
+ sd->npc_item_flag = iflag;
+
return 0;
}
@@ -8619,7 +8622,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
* 2 - force unequip
*------------------------------------------*/
int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
- int i;
+ int i,iflag;
bool status_cacl = false;
nullpo_ret(sd);
@@ -8718,6 +8721,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
sd->state.autobonus &= ~sd->status.inventory[n].equip; //Check for activated autobonus [Inkfish]
sd->status.inventory[n].equip=0;
+ iflag = sd->npc_item_flag;
/* check for combos (MUST be before status_calc_pc) */
if ( sd->inventory_data[n] ) {
@@ -8769,6 +8773,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
}
}
}
+ sd->npc_item_flag = iflag;
return 0;
}