public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (SellGeneralReward reward in this.sellGeneralRewards) { this.level_sellGeneralRewardMap.Add(reward.level, reward); } foreach (Equipment equipment in this._equipments) { if (equipment != null) { if (this.id_equipMap.ContainsKey(equipment.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + equipment.id.ToString("X"), new object[0]); } else { foreach (EquipBreakthrough breakthrough in equipment.equipBreakthroughs) { foreach (GrowthAttribute attribute in equipment.equipBreakthroughs[0].baseGrowthAttributes) { for (int i = 0; i < breakthrough.breakThrough.growthAttributes.Count; i++) { GrowthAttribute attribute2 = breakthrough.breakThrough.growthAttributes[i]; if (attribute.type == attribute2.type) { break; } if (i == (breakthrough.breakThrough.growthAttributes.Count - 1)) { breakthrough.breakThrough.growthAttributes.Add(attribute); } } } } this.id_equipMap.Add(equipment.id, equipment); } } } }
public static Breakthrough LoadFromXml(SecurityElement element) { Breakthrough breakthrough = new Breakthrough { fromTimes = StrParser.ParseDecInt(element.Attribute("FromTimes"), 0), sameCardDeductItemCount = StrParser.ParseDecInt(element.Attribute("SameCardDeductItemCount"), 0), itemCostItemId = StrParser.ParseHexInt(element.Attribute("ItemCostItemId"), 0), itemCostItemCount = StrParser.ParseDecInt(element.Attribute("ItemCostItemCount"), 0), powerUpLevelLimit = StrParser.ParseDecInt(element.Attribute("PowerUpLevelLimit"), 0), isCostSameCardItem = StrParser.ParseBool(element.Attribute("IsCostSameCardItem"), false) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "Attribute") { GrowthAttribute item = GrowthAttribute.LoadFromXml(element2); if (item.baseValue != 0f) { breakthrough.growthAttributes.Add(item); } } else if (tag == "OtherCost") { goto Label_0100; } } goto Label_0111; Label_0100: breakthrough.otherCosts.Add(Cost.LoadFromXml(element2)); Label_0111: bool flag1 = element2.Tag != "Attribute"; } } return(breakthrough); }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (SellGeneralReward reward in this.sellGeneralRewards) { this.level_sellGeneralRewardMap.Add(reward.level, reward); } for (int i = 0; i < this._avatars.Count; i++) { Avatar avatar = this._avatars[i]; if (this.id_avatarDict.ContainsKey(avatar.id)) { Logger.Error(string.Format("Duplicate avatar Id : {0:X}", avatar.id), new object[0]); } else { foreach (AvatarBreakthrough breakthrough in avatar.breakThroughs) { foreach (GrowthAttribute attribute in avatar.breakThroughs[0].baseGrowthAttributes) { for (int j = 0; j < breakthrough.breakThrough.growthAttributes.Count; j++) { GrowthAttribute attribute2 = breakthrough.breakThrough.growthAttributes[j]; if (attribute.type == attribute2.type) { break; } if (j == (breakthrough.breakThrough.growthAttributes.Count - 1)) { breakthrough.breakThrough.growthAttributes.Add(attribute); } } } } this.id_avatarDict.Add(avatar.id, avatar); } } }
private AvatarBreakthrough LoadAvatarBreakThoughFromXml(SecurityElement element) { AvatarBreakthrough breakthrough = new AvatarBreakthrough { assetId = StrParser.ParseHexInt(element.Attribute("AvatarAssetId"), 0), highAssetId = StrParser.ParseHexInt(element.Attribute("HighAvatarAssetId"), 0), particleName = StrParser.ParseStr(element.Attribute("ParticleName"), string.Empty), canGetSellItemGeneralRewards = StrParser.ParseBool(element.Attribute("CanGetSellItemGeneralRewards"), false), leastSameCardCount = StrParser.ParseDecInt(element.Attribute("LeastSameCardCount"), 0), compositeSkillLevel = StrParser.ParseDecInt(element.Attribute("CompositeSkillLevel"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag != "Breakthrough") { if (tag == "SellReward") { goto Label_011D; } if (tag == "BaseAttributes") { goto Label_0133; } if (tag == "PowerAttribute") { goto Label_01C3; } } else { breakthrough.breakThrough = Breakthrough.LoadFromXml(element2); } } continue; Label_011D: breakthrough.sellRewards.Add(Reward.LoadFromXml(element2)); continue; Label_0133: if ((element2.Children != null) && (element2.Children.Count != 0)) { foreach (SecurityElement element3 in element2.Children) { string str2; if (((str2 = element3.Tag) != null) && (str2 == "Attribute")) { GrowthAttribute item = GrowthAttribute.LoadFromXml(element3); if (item.baseValue != 0f) { breakthrough.baseGrowthAttributes.Add(item); } } } } continue; Label_01C3: breakthrough.powerAttributes = PowerAttribute.LoadFromXml(element2); } } return(breakthrough); }
private EquipBreakthrough LoadEquipmentBreakthroughFromXml(SecurityElement element) { EquipBreakthrough breakthrough = new EquipBreakthrough { canGetSellItemGeneralRewards = StrParser.ParseBool(element.Attribute("CanGetSellItemGeneralRewards"), false) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag != "UpgradeRequirementAddtionalCost") { if (tag == "Breakthrough") { goto Label_00B4; } if (tag == "SellReward") { goto Label_00C5; } if (tag == "BaseAttributes") { goto Label_00DB; } if (tag == "PowerAttribute") { goto Label_016B; } } else { breakthrough.upgradeRequirementAddtionalCost = Cost.LoadFromXml(element2); } } continue; Label_00B4: breakthrough.breakThrough = Breakthrough.LoadFromXml(element2); continue; Label_00C5: breakthrough.sellRewards.Add(Reward.LoadFromXml(element2)); continue; Label_00DB: if ((element2.Children != null) && (element2.Children.Count != 0)) { foreach (SecurityElement element3 in element2.Children) { string str2; if (((str2 = element3.Tag) != null) && (str2 == "Attribute")) { GrowthAttribute item = GrowthAttribute.LoadFromXml(element3); if (item.baseValue != 0f) { breakthrough.baseGrowthAttributes.Add(item); } } } } continue; Label_016B: breakthrough.powerAttributes = PowerAttribute.LoadFromXml(element2); } } return(breakthrough); }