Mercurial > repos > snowblizz-super-API-ideas
diff api/Factories/Xml/WarFoundryXmlRaceFactory.cs @ 92:729d9e54162c
Re #111: "Replace" button doesn't always enable
* Implement better fix:
* Make UnitEquipmentItem ID based on unit type ID and equipment item ID
* Make UnitEquipmentItem require UnitType at construction again
* Remove setter from EquipmentItemForUnit
* Make AddEquipmentItem method internal so that the UnitEquipmentItem and not the factory is responsible for setting up the reverse link
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 07 Aug 2009 19:49:21 +0000 |
parents | 571d8ddc7d9a |
children | 05a78408ae8f |
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlRaceFactory.cs Fri Aug 07 19:22:08 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlRaceFactory.cs Fri Aug 07 19:49:21 2009 +0000 @@ -156,7 +156,7 @@ if (equipItem!=null) { - UnitEquipmentItem unitEquipItem = new UnitEquipmentItem(equipItem); + UnitEquipmentItem unitEquipItem = new UnitEquipmentItem(equipItem, type); unitEquipItem.MutexGroup = equip.GetAttribute("exclusivityGroup"); unitEquipItem.RoundNumberUp = equip.GetAttribute("roundDirection").Equals("up"); @@ -223,8 +223,6 @@ { throw new InvalidFileException("Attribute 'costRounding' of unit equipment item " + id + " for " + type.Name + " was not a valid rounding type", e); } - - type.AddEquipmentItem(unitEquipItem); } else {