comparison api/Objects/Unit.cs @ 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 7f13ffcb8765
children 1d13820b3d96
comparison
equal deleted inserted replaced
148:8e636443aa8e 149:c01366bd1627
85 { 85 {
86 if (CanEquipWithItem(unitEquip)) 86 if (CanEquipWithItem(unitEquip))
87 { 87 {
88 if (unitEquip.IsRatioLimit) 88 if (unitEquip.IsRatioLimit)
89 { 89 {
90 equipment[unitEquip] = new UnitEquipmentRatioSelection(this, unitEquip); 90 SetEquipmentRatio(unitEquip, unitEquip.MinPercentage);
91 } 91 }
92 else 92 else
93 { 93 {
94 equipment[unitEquip] = new UnitEquipmentNumericSelection(this, unitEquip); 94 SetEquipmentAmount(unitEquip, unitEquip.MinNumber);
95 } 95 }
96 } 96 }
97 } 97 }
98 } 98 }
99 } 99 }