示例#1
0
        private EmBattleAttribute LoadAdditionsFromXml(SecurityElement element)
        {
            EmBattleAttribute attribute = new EmBattleAttribute {
                type = TypeNameContainer <PositionConfig._EmBattleType> .Parse(element.Attribute("AffectType"), 0),
                name = StrParser.ParseStr(element.Attribute("Name"), null),
                desc = StrParser.ParseStr(element.Attribute("Desc"), null)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "PropertyModifier")
                    {
                        PropertyModifier item = PropertyModifier.LoadFromXml(element2);
                        attribute.modifiers.Add(item);
                    }
                }
            }
            return(attribute);
        }
示例#2
0
        private EmBattleAttribute LoadEmBattleAttributeFromXml(SecurityElement element)
        {
            EmBattleAttribute attribute = new EmBattleAttribute {
                type = TypeNameContainer <_EmBattleType> .Parse(element.Attribute("Type"), 0),
                desc = StrParser.ParseStr(element.Attribute("Desc"), "", true)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "PropertyModifier"))
                    {
                        PropertyModifier item = PropertyModifier.LoadFromXml(element2);
                        attribute.modifiers.Add(item);
                    }
                }
            }
            return(attribute);
        }