Mercurial > repos > snowblizz-super-API-ideas
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 wrap: on
line diff
--- 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); } } }