diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-13 17:32:47 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-13 17:32:47 +0000 |
commit | 30ca43b9befcb2662d32eba4d8cff76b114203fe (patch) | |
tree | 37984b12320fc3e90536f9b506b91483da341c70 /src/map/battle.c | |
parent | dc2e94dba8a7d0a894456ac03262f14c5a9090ca (diff) | |
download | hercules-30ca43b9befcb2662d32eba4d8cff76b114203fe.tar.gz hercules-30ca43b9befcb2662d32eba4d8cff76b114203fe.tar.bz2 hercules-30ca43b9befcb2662d32eba4d8cff76b114203fe.tar.xz hercules-30ca43b9befcb2662d32eba4d8cff76b114203fe.zip |
- Required Weapon, ammo, and skill state are now only checked on begin casting, instead of both on begin and end casting.
- Now when autoguessing ammo consumption, the amount of ammo required is always one (making it require HIT number of arrows was rather high for things like Sonic Blows, specially when things like Arrow Vulcan only consume one arrow)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9861 54d463be-8e91-2dee-dedb-b68131a5f0ec
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); |