diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-15 01:48:10 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-15 01:48:10 +0000 |
commit | 3b873e092f61c8d6224f16e09b50d52060a5da4f (patch) | |
tree | fc1d082a111eacd25843e0a8ade6a969f1a28135 | |
parent | a96717dc85c10987c9f84ed7472718a16d894ae4 (diff) | |
download | hercules-3b873e092f61c8d6224f16e09b50d52060a5da4f.tar.gz hercules-3b873e092f61c8d6224f16e09b50d52060a5da4f.tar.bz2 hercules-3b873e092f61c8d6224f16e09b50d52060a5da4f.tar.xz hercules-3b873e092f61c8d6224f16e09b50d52060a5da4f.zip |
Fixed bug with katar weapon bonus, bugreport:5240
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15460 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/status.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/status.c b/src/map/status.c index cf450c918..dfde3dfd2 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3275,6 +3275,12 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) status->cri = status_calc_critical(bl, sc, b_status->cri); else status->cri = status_calc_critical(bl, sc, b_status->cri + 3*(status->luk - b_status->luk)); + /** + * after status_calc_critical so the bonus is applied despite if you have or not a sc bugreport:5240 + **/ + if( bl->type == BL_PC && ((TBL_PC*)bl)->status.weapon == W_KATAR ) + status->cri <<= 1; + } if(flag&SCB_FLEE2 && b_status->flee2) { @@ -3967,8 +3973,8 @@ static unsigned short status_calc_matk(struct block_list *bl, struct status_chan return (unsigned short)cap_value(matk,0,USHRT_MAX); } -static signed short status_calc_critical(struct block_list *bl, struct status_change *sc, int critical) -{ +static signed short status_calc_critical(struct block_list *bl, struct status_change *sc, int critical) { + if(!sc || !sc->count) return cap_value(critical,10,SHRT_MAX); @@ -3984,8 +3990,7 @@ static signed short status_calc_critical(struct block_list *bl, struct status_ch critical += critical; if(sc->data[SC_CAMOUFLAGE]) critical += 100; - if( bl->type == BL_PC && ((TBL_PC*)bl)->status.weapon == W_KATAR ) - critical <<= 1; + return (short)cap_value(critical,10,SHRT_MAX); } |