Przeglądaj źródła

Moved pc_skillatk_bonus after mdef reduction (renewal) (#8699)

Fixed #8698
Atemo 7 miesięcy temu
rodzic
commit
0551a5390a
1 zmienionych plików z 9 dodań i 0 usunięć
  1. 9 0
      src/map/battle.cpp

+ 9 - 0
src/map/battle.cpp

@@ -8750,9 +8750,11 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
 #endif
 
 		if(sd) {
+#ifndef RENEWAL
 			//Damage bonuses
 			if ((i = pc_skillatk_bonus(sd, skill_id)))
 				ad.damage += (int64)ad.damage*i/100;
+#endif
 
 			//Ignore Defense?
 			if (!flag.imdef && (
@@ -8835,6 +8837,13 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
 #endif
 		}
 
+#ifdef RENEWAL
+		// pc_skillatk_bonus must be after def reduction and before the damages applied when the target is hit (at least on renewal)
+		if ((i = pc_skillatk_bonus(sd, skill_id)) > 0) {
+			ad.damage += (int64)ad.damage*i/100;
+		}
+#endif
+
 		//Apply the physical part of the skill's damage. [Skotlex]
 		switch (skill_id) {
 			case CR_GRANDCROSS: