Pārlūkot izejas kodu

Equipment DEF penalty shouldn't be applied to players in Mental Strength.(bugreport:3454)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14010 54d463be-8e91-2dee-dedb-b68131a5f0ec
Inkfish 15 gadi atpakaļ
vecāks
revīzija
feb7cc2d61
2 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. 2 0
      Changelog-Trunk.txt
  2. 4 2
      src/map/battle.c

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+09/08/17
+	* Equipment DEF penalty shouldn't be applied to players in Mental Strength. (bugreport:3454) [Inkfish]
 09/08/14
 	* Fixed self skills affecting target unit when used within combo delay for Asura and Flying Kick. (bugreport:3495) [Inkfish]
 09/08/11

+ 4 - 2
src/map/battle.c

@@ -1807,10 +1807,12 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 				target_count = unit_counttargeted(target,battle_config.vit_penalty_count_lv);
 				if(target_count >= battle_config.vit_penalty_count) {
 					if(battle_config.vit_penalty_type == 1) {
-						def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
+						if( !tsc || !tsc->data[SC_STEELBODY] )
+							def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
 						def2 = (def2 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
 					} else { //Assume type 2
-						def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
+						if( !tsc || !tsc->data[SC_STEELBODY] )
+							def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
 						def2 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
 					}
 				}