summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorSmokexyz <sagunkho@hotmail.com>2017-04-04 15:15:06 +0800
committerSmokexyz <sagunkho@hotmail.com>2017-04-04 17:00:43 +0800
commit176b7f571307000a8a22cf133041a911127fac5b (patch)
tree9964183dfe53dbb66acf169e56fa54a2979de77c /src/map/pc.c
parent20145c61053479b9acd8ed50c75a80c2a861e349 (diff)
downloadhercules-176b7f571307000a8a22cf133041a911127fac5b.tar.gz
hercules-176b7f571307000a8a22cf133041a911127fac5b.tar.bz2
hercules-176b7f571307000a8a22cf133041a911127fac5b.tar.xz
hercules-176b7f571307000a8a22cf133041a911127fac5b.zip
Unequip arrows when a bow is unequipped. (RE only)
Forces the unequipment of arrows when a bow is unequipped. Based on original PR by @Jedzkie in #1079
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 2cf5d75b4..837438b3d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -10036,6 +10036,11 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
status_change_end(&sd->bl, SC_ARMOR_RESIST, INVALID_TIMER);
}
+#ifdef RENEWAL
+ if (battle->bc->bow_unequip_arrow && pos&EQP_ARMS && sd->equip_index[EQI_AMMO] > 0)
+ pc->unequipitem(sd, sd->equip_index[EQI_AMMO], PCUNEQUIPITEM_FORCE);
+#endif
+
if( sd->state.autobonus&pos )
sd->state.autobonus &= ~sd->status.inventory[n].equip; //Check for activated autobonus [Inkfish]