diff api/Util/UnitEquipmentUtil.cs @ 209:1cde49671c8b

Re #209: equipmentslot Value problem * Remove "calc percentage from numeric" as it can give us results outside the allowed range - UIs should check that they're not trying to use invalid values
author IBBoard <dev@ibboard.co.uk>
date Fri, 13 Nov 2009 10:29:20 +0000
parents df4e56e2ee71
children e586ea79c102
line wrap: on
line diff
--- a/api/Util/UnitEquipmentUtil.cs	Mon Nov 09 16:49:27 2009 +0000
+++ b/api/Util/UnitEquipmentUtil.cs	Fri Nov 13 10:29:20 2009 +0000
@@ -178,9 +178,7 @@
 		
 		public static double GetMinEquipmentPercentage(Unit unit, UnitEquipmentItem equip)
 		{
-			double limitMin = GetMinOfSlotLimitAndEquipmentLimit(equip, equip.MinLimit, unit);
-			double countMin = GetPercentageOfUnitSize(GetMinEquipmentCount(unit, equip), unit);
-			return Math.Min(limitMin, countMin);
+			return GetMinOfSlotLimitAndEquipmentLimit(equip, equip.MinLimit, unit);
 		}
 	}
 }