diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2013-03-21 00:16:08 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2013-03-21 00:16:08 +0800 |
commit | d642604583c9dfcbee525042498b38c312a3d097 (patch) | |
tree | 7a9df147ef6e604421b05b800d8a9e6fb96ac249 /src/map/pc.c | |
parent | 81809c70483a1046f64d25ef4ad88c850ff6a0a2 (diff) | |
download | hercules-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>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 9 |
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; } |