comparison api/Factories/Xml/WarFoundryXmlRaceFactory.cs @ 192:2d0c4248a915

Re #198: Add slots with counts to units * When loading files switch limit on LocalName not Name no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Thu, 29 Oct 2009 20:54:10 +0000
parents 36adabb1c3ea
children 11bad32cfa06
comparison
equal deleted inserted replaced
191:d63bef60bb51 192:2d0c4248a915
183 183
184 private static AbstractLimit GetLimitFromElement(XmlElement limitElem) 184 private static AbstractLimit GetLimitFromElement(XmlElement limitElem)
185 { 185 {
186 AbstractLimit limit = null; 186 AbstractLimit limit = null;
187 187
188 switch(limitElem.Name) 188 switch(limitElem.LocalName)
189 { 189 {
190 case "percentageLimit": 190 case "percentageLimit":
191 double limitPercent = XmlTools.GetDoubleValueFromAttribute (limitElem, "limit"); 191 double limitPercent = XmlTools.GetDoubleValueFromAttribute (limitElem, "limit");
192 bool roundUp = limitElem.GetAttribute("round").Equals("up"); 192 bool roundUp = limitElem.GetAttribute("round").Equals("up");
193 limit = new SimpleRoundedPercentageLimit(limitPercent, roundUp); 193 limit = new SimpleRoundedPercentageLimit(limitPercent, roundUp);