private static bool AddAttribute(XmlNode attribute, MetaType metatype) { string attName = attribute.Attributes["name"].InnerText; XmlNode attStart = attribute.FindChildByName("Start"); XmlNode attNatMax = attribute.FindChildByName("NaturalMax"); XmlNode attAugMax = attribute.FindChildByName("AugmentedMax"); if ((attStart == null || attNatMax == null || attAugMax == null || !AttributeLoader.Attributes.ContainsKey(attName)) && !metatype.Attributes.ContainsKey(attName)) return false; metatype.Attributes.Add(attName, new Attribute(attName, Convert.ToInt16(attStart.InnerText.Trim()), Convert.ToInt16(attNatMax.InnerText.Trim()), Convert.ToInt16(attAugMax.InnerText.Trim()))); return true; }
private static bool AddSpecialAttribute(XmlNode attribute, MetaType metatype) { string attName = attribute.Attributes["name"].InnerText; XmlNode attStart = attribute.FindChildByName("Start"); if ((attStart == null || !AttributeLoader.SpecialAttributes.ContainsKey(attName)) && !metatype.SpecialAttributes.ContainsKey(attName)) return false; metatype.SpecialAttributes.Add(attName, new SpecialAttribute(attName, Convert.ToInt16(attStart.InnerText.Trim()))); return true; }