From 8f9d06128b6cebc776c87af1a0df736847bd803c Mon Sep 17 00:00:00 2001 From: Dastgir Pojee Date: Mon, 3 Oct 2016 21:13:24 +0530 Subject: CRI should only be calculated if flag have SCB_CRI. Fixes #1442 --- src/map/status.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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) -- cgit v1.2.3-70-g09d2