Fix IDE0004

This commit is contained in:
RoosterDragon
2023-02-19 09:55:33 +00:00
committed by Gustas
parent a4f9ceaf09
commit 71ce515d6d
12 changed files with 16 additions and 13 deletions

View File

@@ -109,8 +109,8 @@ namespace OpenRA.Mods.Common.Traits
var sellValue = self.GetSellValue();
// Cast to long to avoid overflow when multiplying by the health
var hp = health != null ? (long)health.Value.HP : 1L;
var maxHP = health != null ? (long)health.Value.MaxHP : 1L;
var hp = health != null ? health.Value.HP : 1L;
var maxHP = health != null ? health.Value.MaxHP : 1L;
var refund = (int)(sellValue * info.RefundPercent * hp / (100 * maxHP));
return "Refund: $" + refund;