# HG changeset patch # User IBBoard # Date 1249761981 0 # Node ID 49a83020174e8ad6d76436f1026a3156027f9d08 # Parent 789dfab1344963efc3f57a4328b2097be0fb18d2 Re #116: Percentage limits on equipment items are negative * Correctly handle "equip all" for rendering of percentages diff -r 789dfab13449 -r 49a83020174e api/Objects/UnitEquipmentItem.cs --- a/api/Objects/UnitEquipmentItem.cs Fri Aug 07 20:14:55 2009 +0000 +++ b/api/Objects/UnitEquipmentItem.cs Sat Aug 08 20:06:21 2009 +0000 @@ -220,21 +220,18 @@ } public static string FormatEquipmentAmount(UnitEquipmentItem item, double amount) - { - if (item.IsRatioLimit) + { + if (amount == WarFoundryCore.INFINITY) + { + return "all"; //TODO: Translate + } + else if (item.IsRatioLimit) { return Math.Round(amount * 100) + "%"; } else { - if (amount == WarFoundryCore.INFINITY) - { - return "all"; //TODO: Translate - } - else - { - return amount.ToString(); - } + return amount.ToString(); } } }