Sfoglia il codice sorgente

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.
munkrej 1 anno fa
parent
commit
b5e3e5e69b
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      src/map/battle.cpp

+ 2 - 0
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;