changeset 149:c01366bd1627

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
author IBBoard <dev@ibboard.co.uk>
date Sat, 26 Sep 2009 10:15:07 +0000
parents 8e636443aa8e
children b36cc4af435b
files api/Objects/Unit.cs
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/api/Objects/Unit.cs	Sat Sep 26 10:14:04 2009 +0000
     1.2 +++ b/api/Objects/Unit.cs	Sat Sep 26 10:15:07 2009 +0000
     1.3 @@ -86,12 +86,12 @@
     1.4  					if (CanEquipWithItem(unitEquip))
     1.5  					{
     1.6  						if (unitEquip.IsRatioLimit)
     1.7 -						{
     1.8 -							equipment[unitEquip] = new UnitEquipmentRatioSelection(this, unitEquip);
     1.9 +						{
    1.10 +							SetEquipmentRatio(unitEquip, unitEquip.MinPercentage);
    1.11  						}
    1.12  						else
    1.13 -						{
    1.14 -							equipment[unitEquip] = new UnitEquipmentNumericSelection(this, unitEquip);
    1.15 +						{
    1.16 +							SetEquipmentAmount(unitEquip, unitEquip.MinNumber);
    1.17  						}
    1.18  					}
    1.19  				}