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.
This commit is contained in:
parent
3cbdcf999f
commit
b5e3e5e69b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user