From 176b7f571307000a8a22cf133041a911127fac5b Mon Sep 17 00:00:00 2001 From: Smokexyz Date: Tue, 4 Apr 2017 15:15:06 +0800 Subject: 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 --- src/map/pc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/map/pc.c') 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] -- cgit v1.2.3-60-g2f50