diff options
author | skyleo <skyleo@skyleo.de> | 2019-11-25 21:43:35 +0100 |
---|---|---|
committer | skyleo <skyleo@skyleo.de> | 2019-11-26 11:00:54 +0100 |
commit | a09352eafd1bec9a0a099b69a37902122c7b8b29 (patch) | |
tree | 6ac2d61611a2766a5c47da11e2611cec87773cf6 | |
parent | 7d5ce7b3a33fb27cf838d863b8f017220abb624a (diff) | |
download | hercules-a09352eafd1bec9a0a099b69a37902122c7b8b29.tar.gz hercules-a09352eafd1bec9a0a099b69a37902122c7b8b29.tar.bz2 hercules-a09352eafd1bec9a0a099b69a37902122c7b8b29.tar.xz hercules-a09352eafd1bec9a0a099b69a37902122c7b8b29.zip |
Fix racial crit bonuses not being affected by katar crit bonus
-rw-r--r-- | src/map/battle.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 2b1b34d1a..9413076fb 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4661,13 +4661,17 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl { short cri = sstatus->cri; if (sd != NULL) { + // Racial crit bonuses are affected by katar's crit bonus. + if (battle_config.show_katar_crit_bonus && sd->weapontype == W_KATAR) + cri += sd->critaddrace[tstatus->race] * 2; + else + cri += sd->critaddrace[tstatus->race]; + // if show_katar_crit_bonus is enabled, it already done the calculation in status.c if (!battle_config.show_katar_crit_bonus && sd->weapontype == W_KATAR) { cri <<= 1; } - cri+= sd->critaddrace[tstatus->race]; - if (flag.arrow) { cri += sd->bonus.arrow_cri; } |