Ejemplo n.º 1
0
        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;
                }
            }
        }
Ejemplo n.º 2
0
        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;
                }
            }
        }