From b5e3e5e69b9c3d755b8191bc6e78e3f277be601e Mon Sep 17 00:00:00 2001 From: munkrej Date: Sat, 20 Apr 2024 15:50:27 +0200 Subject: [PATCH] Fixed wrong double damage calculation for skills in renewal mode (#8260) Note by Playtester: In renewal the "battle_calc_skill_base_damage" function adds to the ATK values rather than resetting them, so calling it twice will cause the values to be doubled, so we can't easily use this system for renewal. Will do a follow-up cleanup later. --- src/map/battle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 2698748dcb..dc402e973d 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -7335,11 +7335,13 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl wd.dmg_lv = ATK_FLEE; else if(!(infdef = is_infinite_defense(target, wd.flag))) { //no need for math against plants +#ifndef RENEWAL // First call function with skill_id 0 to get base damage of a normal attack battle_calc_skill_base_damage(&wd, src, target, 0, 0); // base damage wd.basedamage = wd.damage; // Now get actual skill damage if (skill_id != 0) +#endif battle_calc_skill_base_damage(&wd, src, target, skill_id, skill_lv); // base skill damage int64 ratio = 0;