diff options
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 1bd279ef3..eb20c1c43 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -809,15 +809,11 @@ void battle_consume_ammo(TBL_PC*sd, int skill, int lv) if (skill) { qty = skill_get_ammo_qty(skill, lv); - if (!qty) { //Generic skill that consumes ammo? - qty = skill_get_num(skill, lv); - if (qty < 0) qty *= -1; - else - if (qty == 0) qty = 1; - } + if (!qty) qty = 1; } - if(sd->equip_index[10]>=0) //Qty check should have been done in skill_check_condition - pc_delitem(sd,sd->equip_index[10],qty,0); + + if(sd->equip_index[EQI_AMMO]>=0) //Qty check should have been done in skill_check_condition + pc_delitem(sd,sd->equip_index[EQI_AMMO],qty,0); } struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag); |