diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2015-02-13 15:58:46 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2015-02-13 15:58:46 +0800 |
commit | 8ed5039de954c702c91e43aea9ba1347424d57a2 (patch) | |
tree | e07869cc7ef26dad01fad025998b339f1773353a /src | |
parent | 062eaaa6509a6f10f7166e60b59e90835c3d2964 (diff) | |
download | hercules-8ed5039de954c702c91e43aea9ba1347424d57a2.tar.gz hercules-8ed5039de954c702c91e43aea9ba1347424d57a2.tar.bz2 hercules-8ed5039de954c702c91e43aea9ba1347424d57a2.tar.xz hercules-8ed5039de954c702c91e43aea9ba1347424d57a2.zip |
Fixed Bug#8519
-http://hercules.ws/board/tracker/issue-8519-ranger-skill-fear-breeze-completely-disables-crit/?gopid=24522
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 8 |
1 files 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; + } } } |