diff options
author | Dastgir Pojee <dastgirp@gmail.com> | 2016-10-03 21:13:24 +0530 |
---|---|---|
committer | Dastgir Pojee <dastgirp@gmail.com> | 2016-10-05 19:42:08 +0530 |
commit | 8f9d06128b6cebc776c87af1a0df736847bd803c (patch) | |
tree | ac8a9263cb75e16776545fc93b8cfefe942f6804 | |
parent | 4247f82e84f7b3a02d5d5c37102fd5908ff857e3 (diff) | |
download | hercules-8f9d06128b6cebc776c87af1a0df736847bd803c.tar.gz hercules-8f9d06128b6cebc776c87af1a0df736847bd803c.tar.bz2 hercules-8f9d06128b6cebc776c87af1a0df736847bd803c.tar.xz hercules-8f9d06128b6cebc776c87af1a0df736847bd803c.zip |
CRI should only be calculated if flag have SCB_CRI.
Fixes #1442
-rw-r--r-- | src/map/status.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/status.c b/src/map/status.c index 5e65244ef..37efe1f93 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3806,13 +3806,15 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) } if(flag&SCB_CRI && bst->cri) { - if (st->luk == bst->luk) + if (st->luk == bst->luk) { st->cri = status->calc_critical(bl, sc, bst->cri, true); - else + } else { st->cri = status->calc_critical(bl, sc, bst->cri + 3*(st->luk - bst->luk), true); + } + if (battle_config.show_katar_crit_bonus && bl->type == BL_PC && BL_UCAST(BL_PC, bl)->status.weapon == W_KATAR) { + st->cri *= 2; + } } - if (battle_config.show_katar_crit_bonus && bl->type == BL_PC && BL_UCAST(BL_PC, bl)->status.weapon == W_KATAR) - st->cri <<= 1; if(flag&SCB_FLEE2 && bst->flee2) { if (st->luk == bst->luk) |