Przeglądaj źródła

Fixed a sign error in battle_calc_cardfix (#5285)

Fixed #5273
Mistake introduced in https://github.com/rathena/rathena/commit/2e04ca98b0efb3973e880dc16da57e737d57281a
Thanks to @ecdarreola
Atemo 4 lat temu
rodzic
commit
d1be0ec6cb
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      src/map/battle.cpp

+ 3 - 3
src/map/battle.cpp

@@ -700,7 +700,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
 				cardfix = cardfix * (100 - tsd->subsize[sstatus->size] - tsd->subsize[SZ_ALL]) / 100;
 				cardfix = cardfix * (100 - tsd->magic_subsize[sstatus->size] - tsd->magic_subsize[SZ_ALL]) / 100;
 				cardfix = cardfix * (100 - tsd->subrace2[s_race2]) / 100;
-				int race_fix = tsd->subrace[sstatus->race] - tsd->subrace[RC_ALL];
+				int race_fix = tsd->subrace[sstatus->race] + tsd->subrace[RC_ALL];
 				for (const auto &it : tsd->subrace3) {
 					if (it.race != sstatus->race)
 						continue;
@@ -909,7 +909,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
 				}
 				cardfix = cardfix * (100 - tsd->subsize[sstatus->size] - tsd->subsize[SZ_ALL]) / 100;
 				cardfix = cardfix * (100 - tsd->subrace2[s_race2]) / 100;
-				int race_fix = tsd->subrace[sstatus->race] - tsd->subrace[RC_ALL];
+				int race_fix = tsd->subrace[sstatus->race] + tsd->subrace[RC_ALL];
 				for (const auto &it : tsd->subrace3) {
 					if (it.race != sstatus->race)
 						continue;
@@ -956,7 +956,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
 						ele_fix += tsd->subdefele[s_defele] + tsd->subdefele[ELE_ALL];
 					cardfix = cardfix * (100 - ele_fix) / 100;
 				}
-				int race_fix = tsd->subrace[sstatus->race] - tsd->subrace[RC_ALL];
+				int race_fix = tsd->subrace[sstatus->race] + tsd->subrace[RC_ALL];
 				for (const auto &it : tsd->subrace3) {
 					if (it.race != sstatus->race)
 						continue;