Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff api/Objects/Race.cs @ 85:46ad6f478203
Re #50: Complete core loading of WarFoundry XML files
* Start loading of UnitEquipmentItems
* Fix XPath queries for equipment items and abilities
* Allow UnitEquipmentItem to be created without a UnitType
* Make adding UnitEquipmentItem to UnitType set UnitType of UnitEquipmentItem
* Make loading of abilities and equipment items add the item to the race
Also:
* Code cleanup (line endings)
* Make method to get equipment by ID return null instead of throwing "no such key" exception
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 01 Aug 2009 16:06:25 +0000 |
parents | 3ea0ab04352b |
children | 2f3cafb69799 |
line wrap: on
line diff
--- a/api/Objects/Race.cs Sun Jul 05 09:50:40 2009 +0000 +++ b/api/Objects/Race.cs Sat Aug 01 16:06:25 2009 +0000 @@ -131,10 +131,10 @@ } } - public EquipmentItem GetEquipmentItem(string id) + public EquipmentItem GetEquipmentItem(string id) { EnsureFullyLoaded(); - return (EquipmentItem)equipment[id]; + return DictionaryUtils.GetValue(equipment, id); } public List<EquipmentItem> GetEquipmentList()