summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battle/player.conf4
-rw-r--r--src/map/battle.c5
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/status.c2
4 files changed, 10 insertions, 2 deletions
diff --git a/conf/battle/player.conf b/conf/battle/player.conf
index c5db26c6b..b31385b8b 100644
--- a/conf/battle/player.conf
+++ b/conf/battle/player.conf
@@ -120,6 +120,10 @@ show_hp_sp_drain: no
// Display the gained hp/sp values from killing mobs? (Ie: Sky Deleter Card)
show_hp_sp_gain: yes
+// Show the critical bonus for katar class weapon in player status window?
+// On official server, the critical bonus from katar class weapon isn't display. (Default: no)
+show_katar_crit_bonus: no
+
// If set, when A accepts B as a friend, B will also be added to A's friend
// list, otherwise, only A appears in B's friend list.
// NOTE: this setting only enables friend auto-adding; auto-deletion does not work yet
diff --git a/src/map/battle.c b/src/map/battle.c
index 1c3817a31..a040d443b 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4558,8 +4558,8 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
{
short cri = sstatus->cri;
if (sd) {
- // Check for katar here as katar crit bonus should not be displayed
- if (sd->status.weapon == W_KATAR) {
+ // if show_katar_crit_bonus is enabled, it already done the calculation in status.c
+ if (!battle_config.show_katar_crit_bonus && sd->status.weapon == W_KATAR) {
cri <<= 1;
}
@@ -7078,6 +7078,7 @@ static const struct battle_data {
{ "mob_remove_damaged", &battle_config.mob_remove_damaged, 1, 0, 1, },
{ "show_hp_sp_drain", &battle_config.show_hp_sp_drain, 0, 0, 1, },
{ "show_hp_sp_gain", &battle_config.show_hp_sp_gain, 1, 0, 1, },
+ { "show_katar_crit_bonus", &battle_config.show_katar_crit_bonus, 0, 0, 1, },
{ "mob_npc_event_type", &battle_config.mob_npc_event_type, 1, 0, 1, },
{ "character_size", &battle_config.character_size, 1|2, 0, 1|2, },
{ "retaliate_to_master", &battle_config.retaliate_to_master, 1, 0, 1, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 586673c17..37d78436c 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -399,6 +399,7 @@ struct Battle_Config {
int boss_active_time;
int show_hp_sp_drain, show_hp_sp_gain; //[Skotlex]
+ int show_katar_crit_bonus;
int mob_npc_event_type; //Determines on who the npc_event is executed. [Skotlex]
diff --git a/src/map/status.c b/src/map/status.c
index c7ce2c9c0..32e5760a7 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3754,6 +3754,8 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
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 && ((TBL_PC*)bl)->status.weapon == W_KATAR)
+ st->cri <<= 1;
if(flag&SCB_FLEE2 && bst->flee2) {
if (st->luk == bst->luk)