diff api/Factories/Xml/WarFoundryXmlRaceFactory.cs @ 90:bd2aaa9a61df

Re #50: Complete loading of core XML file * Fix remaining bugs from trying to load UnitEquipmentItem values from wrong element * Add type cast to fix infinite loop
author IBBoard <dev@ibboard.co.uk>
date Sat, 01 Aug 2009 21:40:53 +0000
parents 110a7b0bcab5
children 571d8ddc7d9a
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlRaceFactory.cs	Sat Aug 01 20:04:13 2009 +0000
+++ b/api/Factories/Xml/WarFoundryXmlRaceFactory.cs	Sat Aug 01 21:40:53 2009 +0000
@@ -157,8 +157,8 @@
 				if (equipItem!=null)
 				{
 					UnitEquipmentItem unitEquipItem = new UnitEquipmentItem(equipItem);
-					unitEquipItem.MutexGroup = elem.GetAttribute("exclusivityGroup");					
-					unitEquipItem.RoundNumberUp = elem.GetAttribute("roundDirection").Equals("up");
+					unitEquipItem.MutexGroup = equip.GetAttribute("exclusivityGroup");					
+					unitEquipItem.RoundNumberUp = equip.GetAttribute("roundDirection").Equals("up");
 					
 					
 					try