public static GirlActionandSoundObject Load(SecurityElement element) { GirlActionandSoundObject girlActionandSoundObject = new GirlActionandSoundObject(); girlActionandSoundObject.ID = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("ID"), ""), -1); girlActionandSoundObject.GirID = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("GirID"), ""), -1); girlActionandSoundObject.PartID = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("PartID"), ""), -1); girlActionandSoundObject.IsAgree = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("IsAgree"), ""), -1) == 0 ? false : true; girlActionandSoundObject.HomeLevNeed = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("HomeLevNeed"), ""), -1); girlActionandSoundObject.GoodsIDNeed = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("GoodsIDNeed"), ""), -1); girlActionandSoundObject.IntimacyLevNeed = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("IntimacyLevNeed"), ""), -1); girlActionandSoundObject.SoundDelayTime = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("SoundDelayTime"), ""), -1); girlActionandSoundObject.SoundName = StrParser.ParseStr(element.Attribute("SoundName"), ""); girlActionandSoundObject.ActionName = StrParser.ParseStr(element.Attribute("ActionName"), ""); girlActionandSoundObject.Prob = StrParser.ParseFloat(StrParser.ParseStr(element.Attribute("Prob"), ""), -1.0f); return(girlActionandSoundObject); }
public override bool Load(SecurityElement element) { if (element.Tag != "Items") { return(false); } if (element.Children != null) { foreach (SecurityElement childrenElement in element.Children) { GirlActionandSoundObject girlActionandSoundObject = GirlActionandSoundObject.Load(childrenElement); if (!_girlActionandSoundObjectDict.ContainsKey(girlActionandSoundObject.ID)) { _girlActionandSoundObjectDict[girlActionandSoundObject.ID] = girlActionandSoundObject; } } } return(true); }