# HG changeset patch # User IBBoard # Date 1257713145 0 # Node ID 3ef067225dc3491833690a76e1011f43e0aa4275 # Parent df4e56e2ee71cf12a5215bc3987926a1031c8b64 Fixes #208: equipmentslot limit issues * Construct units properly by using the UnitEquipmentUtil methods to get the actual minimum amount based on the slot limits as well diff -r df4e56e2ee71 -r 3ef067225dc3 api/Objects/Unit.cs --- a/api/Objects/Unit.cs Fri Nov 06 20:48:07 2009 +0000 +++ b/api/Objects/Unit.cs Sun Nov 08 20:45:45 2009 +0000 @@ -92,11 +92,11 @@ if (minLimit is IPercentageLimit) { - SetEquipmentRatio(unitEquip, ((IPercentageLimit)minLimit).Percentage); + SetEquipmentRatio(unitEquip, UnitEquipmentUtil.GetMinEquipmentPercentage(this, unitEquip)); } else { - SetEquipmentAmount(unitEquip, minLimit.GetLimit(this.Size)); + SetEquipmentAmount(unitEquip, UnitEquipmentUtil.GetMinEquipmentCount(this, unitEquip)); } } } diff -r df4e56e2ee71 -r 3ef067225dc3 api/Objects/UnitEquipmentItem.cs --- a/api/Objects/UnitEquipmentItem.cs Fri Nov 06 20:48:07 2009 +0000 +++ b/api/Objects/UnitEquipmentItem.cs Sun Nov 08 20:45:45 2009 +0000 @@ -176,7 +176,7 @@ limit = minLimit; } else - { + { limit = new SimpleRoundedPercentageLimit(100, false); } }