internal override void Plus(XDocument xdoc) { foreach (var element in xdoc.Root.Elements()) { var val = element.Value; int valI; int.TryParse(val, out valI); switch (element.Name.LocalName) { case "id": case "type": break; case "figures": if (!HfIds.Contains(valI)) { HfIds.Add(valI); } break; default: DFXMLParser.UnexpectedXmlElement(xdoc.Root.Name.LocalName + "\t" + Types[Type], element, xdoc.Root.ToString()); break; } } }
internal override void Plus(XDocument xdoc) { foreach (var element in xdoc.Root.Elements()) { var val = element.Value; int valI; int.TryParse(val, out valI); switch (element.Name.LocalName) { case "id": case "type": break; case "group": if (HfIds == null) { HfIds = new List <int>(); } if (!HfIds.Contains(valI)) { HfIds.Add(valI); } break; case "pets": var race = World.GetAddRace(val); if (Pets == null) { Pets = new List <Race>(); } Pets.Add(race); break; case "site": break; default: DFXMLParser.UnexpectedXmlElement(xdoc.Root.Name.LocalName + "\t" + Types[Type], element, xdoc.Root.ToString()); break; } } }