summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorcsnv <ctt@csnv.es>2015-07-03 18:50:54 +0200
committercsnv <ctt@csnv.es>2015-07-03 18:50:54 +0200
commitab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7 (patch)
treec413a8bde03c0165b1b8fa1efbec409d58e26868 /src/map
parent53c8d6755372b34f0f6b53433b57fa061e1cc7a8 (diff)
downloadhercules-ab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7.tar.gz
hercules-ab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7.tar.bz2
hercules-ab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7.tar.xz
hercules-ab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7.zip
Corrected critical bonus display
- Fixes #573
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c14
-rw-r--r--src/map/status.c6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 603db4738..4e56b47ce 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4485,13 +4485,19 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
skill_id == NJ_KIRIKAGE))
{
short cri = sstatus->cri;
- if (sd)
- {
+ if (sd) {
+ // Check for katar here as katar crit bonus should not be displayed
+ if (sd->status.weapon == W_KATAR) {
+ cri <<= 1;
+ }
+
cri+= sd->critaddrace[tstatus->race];
- if(flag.arrow)
+
+ if (flag.arrow) {
cri += sd->bonus.arrow_cri;
+ }
}
- if( sc && sc->data[SC_CAMOUFLAGE] )
+ if (sc && sc->data[SC_CAMOUFLAGE])
cri += 10 * (10-sc->data[SC_CAMOUFLAGE]->val4);
#ifndef RENEWAL
//The official equation is *2, but that only applies when sd's do critical.
diff --git a/src/map/status.c b/src/map/status.c
index fa6d4ea8c..685febcdb 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3586,12 +3586,6 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
st->cri = status->calc_critical(bl, sc, bst->cri, true);
else
st->cri = status->calc_critical(bl, sc, bst->cri + 3*(st->luk - bst->luk), true);
- /**
- * 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 )
- st->cri <<= 1;
-
}
if(flag&SCB_FLEE2 && bst->flee2) {