Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff api/Factories/Xml/WarFoundryXmlFactory.cs @ 44:db951aad24b9
Re #50 - Complete loading of WarFoundry XML
* Fix loading of armour type by fixing typo in Race schema
* Revert to an exception if there is a parse error on the armour type (since the schema should validate it)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 22 Mar 2009 17:10:49 +0000 |
parents | d0812d7de39d |
children | 75a44b7753d4 |
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlFactory.cs Sun Mar 22 17:05:01 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlFactory.cs Sun Mar 22 17:10:49 2009 +0000 @@ -542,16 +542,10 @@ } catch(ArgumentException ex) { - //throw new InvalidFileException("Attribute 'armourType' of equipment "+id+" was not a valid value from the enumeration"); - LogNotifier.WarnFormat(GetType(), "Invalid 'armourType' for equipment {0} - {1}", id, ex.Message); - armourType = ArmourType.None; + throw new InvalidFileException("Attribute 'armourType' of equipment "+id+" was not a valid value from the enumeration"); } - if (elem.ChildNodes.Count>0) - { - //It has stats! - //TODO: Parse equipment stats - } + //TODO: Parse equipment stats if there are any return new EquipmentItem(id, name, cost, min, max, armourType, race); }