diff api/Util/UnitEquipmentUtil.cs @ 210:e586ea79c102

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 11:24:27 +0000
parents 1cde49671c8b
children dce340f9cedc
line wrap: on
line diff
--- a/api/Util/UnitEquipmentUtil.cs	Fri Nov 13 10:29:20 2009 +0000
+++ b/api/Util/UnitEquipmentUtil.cs	Fri Nov 13 11:24:27 2009 +0000
@@ -139,9 +139,7 @@
 		
 		public static double GetMaxEquipmentPercentage(Unit unit, UnitEquipmentItem equip)
 		{
-			double limitMax = GetMinOfSlotLimitAndEquipmentLimit(equip, equip.MaxLimit, unit);
-			double countMax = GetPercentageOfUnitSize(GetMaxEquipmentCount(unit, equip), unit);
-			return Math.Max(limitMax, countMax);
+			return GetMinOfSlotLimitAndEquipmentLimit(equip, equip.MaxLimit, unit);
 		}
 		
 		private static double GetPercentageOfUnitSize(int number, Unit unit)