summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-12-15 16:39:14 +0100
committerGitHub <noreply@github.com>2019-12-15 16:39:14 +0100
commited80595290029d9f4909e50e07c99d9e7a6d6625 (patch)
tree4dc7e8a54a31a612935e68f2ca41fbfbc5e28ec1 /src
parent3e35bb9733cfdfb6e9aa6e8b66257f0628f1e7aa (diff)
parenta09352eafd1bec9a0a099b69a37902122c7b8b29 (diff)
downloadhercules-ed80595290029d9f4909e50e07c99d9e7a6d6625.tar.gz
hercules-ed80595290029d9f4909e50e07c99d9e7a6d6625.tar.bz2
hercules-ed80595290029d9f4909e50e07c99d9e7a6d6625.tar.xz
hercules-ed80595290029d9f4909e50e07c99d9e7a6d6625.zip
Merge pull request #2588 from skyleo/racialcritfix
Fix racial crit bonuses not being affected by katar crit bonus
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c8
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;
}