Procházet zdrojové kódy

Remove Exp Tap Bonus from No Damage Skills (#9207)

- By default skills that don't deal damage no longer count towards the exp tap bonus
- Added an option to re-enable this feature
- Fixes #9206
Playtester před 1 měsícem
rodič
revize
295415479c
4 změnil soubory, kde provedl 9 přidání a 1 odebrání
  1. 5 0
      conf/battle/exp.conf
  2. 1 0
      src/map/battle.cpp
  3. 1 0
      src/map/battle.hpp
  4. 2 1
      src/map/skill.cpp

+ 5 - 0
conf/battle/exp.conf

@@ -45,6 +45,11 @@ exp_bonus_attacker: 25
 // (eg: if set at 5, the max bonus is 4*bonus-per-char regardless of attackers)
 exp_bonus_max_attacker: 12
 
+// Should casting skills that deal no damage still make you count as an attacker? (Note 1)
+// Setting this to yes makes skills like Lex Aeterna increase the exp a monster gives.
+// Officially you need to deal damage for it to count. 
+exp_bonus_nodamage_attacker: no
+
 // MVP bonus exp rate. (Note 2)
 mvp_exp_rate: 100
 

+ 1 - 0
src/map/battle.cpp

@@ -11788,6 +11788,7 @@ static const struct _battle_data {
 	{ "exp_calc_type",                      &battle_config.exp_calc_type,                   0,      0,      2,              },
 	{ "exp_bonus_attacker",                 &battle_config.exp_bonus_attacker,              25,     0,      INT_MAX,        },
 	{ "exp_bonus_max_attacker",             &battle_config.exp_bonus_max_attacker,          12,     2,      INT_MAX,        },
+	{ "exp_bonus_nodamage_attacker",        &battle_config.exp_bonus_nodamage_attacker,     0,      0,      1,              },
 	{ "min_skill_delay_limit",              &battle_config.min_skill_delay_limit,           100,    10,     INT_MAX,        },
 	{ "amotion_min_skill_delay",            &battle_config.amotion_min_skill_delay,         0,      0,      1,              },
 	{ "default_walk_delay",                 &battle_config.default_walk_delay,              300,    0,      INT_MAX,        },

+ 1 - 0
src/map/battle.hpp

@@ -431,6 +431,7 @@ struct Battle_Config
 	int32 exp_calc_type;
 	int32 exp_bonus_attacker;
 	int32 exp_bonus_max_attacker;
+	int32 exp_bonus_nodamage_attacker;
 	int32 min_skill_delay_limit;
 	int32 amotion_min_skill_delay;
 	int32 default_walk_delay;

+ 2 - 1
src/map/skill.cpp

@@ -13649,7 +13649,8 @@ int32 skill_castend_nodamage_id (struct block_list *src, struct block_list *bl,
 	}
 
 	if (dstmd) { //Mob skill event for no damage skills (damage ones are handled in battle_damage/skill_attack) [Skotlex]
-		mob_log_damage(dstmd, src, 0); //Log interaction (counts as 'attacker' for the exp bonus)
+		if (battle_config.exp_bonus_nodamage_attacker != 0)
+			mob_log_damage(dstmd, src, 0); //Log interaction (counts as 'attacker' for the exp bonus)
 		mobskill_event(dstmd, src, tick, MSC_SKILLUSED|(skill_id<<16));
 	}