# HG changeset patch # User IBBoard # Date 1253960107 0 # Node ID c01366bd1627e023e1fdf05e6073cafc9999a1fa # Parent 8e636443aa8e8fd11e6a84797a01ce5c2e5a538d Fixes #181: Unit points costs don't always include equipment * Make setting initial equipment use the public API so that it triggers the correct cost calculation changes diff -r 8e636443aa8e -r c01366bd1627 api/Objects/Unit.cs --- a/api/Objects/Unit.cs Sat Sep 26 10:14:04 2009 +0000 +++ b/api/Objects/Unit.cs Sat Sep 26 10:15:07 2009 +0000 @@ -86,12 +86,12 @@ if (CanEquipWithItem(unitEquip)) { if (unitEquip.IsRatioLimit) - { - equipment[unitEquip] = new UnitEquipmentRatioSelection(this, unitEquip); + { + SetEquipmentRatio(unitEquip, unitEquip.MinPercentage); } else - { - equipment[unitEquip] = new UnitEquipmentNumericSelection(this, unitEquip); + { + SetEquipmentAmount(unitEquip, unitEquip.MinNumber); } } }