summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRidley <ridley8819@gmail.com>2016-10-05 18:46:33 +0200
committerGitHub <noreply@github.com>2016-10-05 18:46:33 +0200
commit336c264a324d708a3b5a72c1c086b74dc76c1b0f (patch)
tree459e8a4f3961bb21ee653e6627dfc489726643ee
parent47513bce994a2e50022bb21171d5b250635ebfc9 (diff)
parent8f9d06128b6cebc776c87af1a0df736847bd803c (diff)
downloadhercules-336c264a324d708a3b5a72c1c086b74dc76c1b0f.tar.gz
hercules-336c264a324d708a3b5a72c1c086b74dc76c1b0f.tar.bz2
hercules-336c264a324d708a3b5a72c1c086b74dc76c1b0f.tar.xz
hercules-336c264a324d708a3b5a72c1c086b74dc76c1b0f.zip
Merge pull request #1459 CRI should only be calculated if flag have SCB_CRI
CRI should only be calculated if flag have SCB_CRI.
-rw-r--r--src/map/status.c10
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)