From 8ed5039de954c702c91e43aea9ba1347424d57a2 Mon Sep 17 00:00:00 2001 From: malufett Date: Fri, 13 Feb 2015 15:58:46 +0800 Subject: Fixed Bug#8519 -http://hercules.ws/board/tracker/issue-8519-ranger-skill-fear-breeze-completely-disables-crit/?gopid=24522 Signed-off-by: malufett --- src/map/battle.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index 384d2e71f..1fc7f0bc5 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4356,7 +4356,6 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list else if(sc && sc->data[SC_FEARBREEZE] && sd->weapontype1==W_BOW && (i = sd->equip_index[EQI_AMMO]) >= 0 && sd->inventory_data[i] && sd->status.inventory[i].amount > 1){ int chance = rnd()%100; - wd.type = 0x08; switch(sc->data[SC_FEARBREEZE]->val1){ case 5: if( chance < 3){// 3 % chance to attack 5 times. @@ -4380,8 +4379,11 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list break; } } - wd.div_ = min(wd.div_,sd->status.inventory[i].amount); - sc->data[SC_FEARBREEZE]->val4 = wd.div_-1; + if ( wd.div_ > 1 ) { + wd.div_ = min(wd.div_, sd->status.inventory[i].amount); + sc->data[SC_FEARBREEZE]->val4 = wd.div_ - 1; + wd.type = 0x08; + } } } -- cgit v1.2.3-70-g09d2