public GuildTalent LoadGuildTalentFromXml(SecurityElement element) { GuildTalent talent = new GuildTalent { BossType = TypeNameContainer <_TalentBossType> .Parse(element.Attribute("BossType"), 0), TalentId = StrParser.ParseHexInt(element.Attribute("TalentId"), 0), TalentName = StrParser.ParseStr(element.Attribute("TalentName"), ""), CostTalent = StrParser.ParseDecInt(element.Attribute("CostTalent"), 0), IconId = StrParser.ParseHexInt(element.Attribute("IconId"), 0), TalentDesc = StrParser.ParseStr(element.Attribute("TalentDesc"), "") }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "TalentValue") { talent.TalentValues.Add(this.LoadTalentValueFromXml(element2)); } else if (tag == "MapNum") { goto Label_00F7; } } continue; Label_00F7: talent.MapNums.Add(StrParser.ParseDecInt(element2.Text, 0)); } } return(talent); }
private Skill LoadSkillFromXml(SecurityElement element) { return(new Skill { id = StrParser.ParseHexInt(element.Attribute("Id"), 0), level = StrParser.ParseDecInt(element.Attribute("Level"), 0) }); }
private Task LoadTaskFromXml(SecurityElement element) { Task task = new Task { TaskId = StrParser.ParseHexInt(element.Attribute("Id"), 0), Priority = StrParser.ParseDecInt(element.Attribute("Priority"), 0), TaskType = TypeNameContainer <_TaskType> .Parse(element.Attribute("TaskType"), 0), GotoUI = TypeNameContainer <_UIType> .Parse(element.Attribute("GotoUI"), 0), IsOpen = StrParser.ParseBool(element.Attribute("IsOpen"), false) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string str; if (((str = element2.Tag) != null) && (str == "Data")) { if (((task.TaskType == 2) || (task.TaskType == 5)) || (((task.TaskType == 0x1a) || (task.TaskType == 0x1d)) || (task.TaskType == 30))) { task.Datas.Add(StrParser.ParseHexInt(element2.Attribute("Value"), 0)); } else if (task.TaskType == 14) { task.Datas.Add(TypeNameContainer <_DungeonDifficulity> .Parse(element2.Attribute("Value"), 1)); } } } } return(task); }
public override void LoadFromXml(SecurityElement element) { if ((element.Tag == "IllustrationConfig") && (element.Children != null)) { foreach (SecurityElement element2 in element.Children) { if (element2.Tag == "Illustration") { Illustration item = new Illustration { Id = StrParser.ParseHexInt(element2.Attribute("Id"), 0), SortIndex = StrParser.ParseDecInt(element2.Attribute("SortIndex"), 0) }; foreach (SecurityElement element3 in element2.Children) { if (element3.Tag == "Cost") { Cost cost = new Cost { id = StrParser.ParseHexInt(element3.Attribute("Id"), 0), count = StrParser.ParseDecInt(element3.Attribute("Count"), 0) }; item.Cost.Add(cost); } if (element3.Tag == "Fragment") { item.FragmentId = StrParser.ParseHexInt(element3.Attribute("Id"), 0); item.FragmentCount = StrParser.ParseDecInt(element3.Attribute("Count"), 0); } } this._illustrations.Add(item); } } } }
private Goods LoadGoodsFromXml(SecurityElement element) { Goods goods = new Goods { goodsId = StrParser.ParseHexInt(element.Attribute("GoodsId"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { if (element2.Tag == "Reward") { goods.reward = Reward.LoadFromXml(element2); } if (element2.Tag == "Cost") { goods.cost = Cost.LoadFromXml(element2); } if (element2.Tag == "DiscountCost") { goods.discountCost = Cost.LoadFromXml(element2); } } } return(goods); }
public static CycleRewardSet LoadFromXml(SecurityElement element) { return(new CycleRewardSet { id = StrParser.ParseHexInt(element.Attribute("Id"), 0), showId = StrParser.ParseHexInt(element.Attribute("ShowId"), 0) }); }
private AssembleSetting LoadAssembleFromXml(SecurityElement element) { AssembleSetting setting = new AssembleSetting { Id = StrParser.ParseHexInt(element.Attribute("Id"), 0), Type = TypeNameContainer <_Type> .Parse(element.Attribute("Type"), 0), Name = StrParser.ParseStr(element.Attribute("Name"), string.Empty) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "Part") { setting.Parts.Add(this.LoadSuitPartFromXml(element2)); } else if (tag == "Assemble") { goto Label_00AE; } } continue; Label_00AE: setting.Assembles.Add(this.LoadSuiteAssembleFromXml(element2)); } } return(setting); }
private MonthCardRewardAndIcon LoadMonthCardRewardAndIconFromXml(SecurityElement element) { MonthCardRewardAndIcon icon = new MonthCardRewardAndIcon { iconId = StrParser.ParseHexInt(element.Attribute("IconId"), 0), fixTimeRewardSetId = StrParser.ParseHexInt(element.Attribute("FixRewardSetId"), 0), randomRewardSetId = StrParser.ParseHexInt(element.Attribute("RandomRewardSetId"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "FixReward") { icon.fixRewardShow.Add(Reward.LoadFromXml(element2)); } else if (tag == "RandomReward") { goto Label_00A9; } } continue; Label_00A9: icon.randomRewardShow.Add(Reward.LoadFromXml(element2)); } } return(icon); }
public TavernRewardInfo LoadTavernRewardInfoFromXml(SecurityElement element) { TavernRewardInfo info = new TavernRewardInfo { TavernId = StrParser.ParseHexInt(element.Attribute("TavernId"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "Reward") { info.Reward = Reward.LoadFromXml(element2); } else if (tag == "TenTavernReward") { goto Label_0073; } } continue; Label_0073: info.TenTavernReward = Reward.LoadFromXml(element2); } } return(info); }
private GiveMeFiveConfig LoadGiveMeFiveConfigFromXml(SecurityElement element) { GiveMeFiveConfig config = new GiveMeFiveConfig { rewardSetId = StrParser.ParseHexInt(element.Attribute("RewardSetId"), 0) }; foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "URL") { GiveMeFiveConfig.UrlSetting item = new GiveMeFiveConfig.UrlSetting { device = TypeNameContainer <_DeviceType> .Parse(element2.Attribute("Device"), 0), value = element2.Attribute("Value") }; config.urlSettings.Add(item); } else if (tag == "TipPlayerLevel") { goto Label_009F; } } continue; Label_009F: config.tipPlayerLevels.Add(StrParser.ParseDecInt(element2.Attribute("PlayerLevel"), 0x7fffffff)); } return(config); }
public override void LoadFromXml(SecurityElement element) { if (element.Tag == "SceneConfig") { this._loginSceneId = StrParser.ParseHexInt(element.Attribute("LoginSceneId"), this._loginSceneId); this._mainSceneId = StrParser.ParseHexInt(element.Attribute("MainSceneId"), this._mainSceneId); this._robSceneId = StrParser.ParseHexInt(element.Attribute("RobSceneId"), this._robSceneId); this._arenaSceneId = StrParser.ParseHexInt(element.Attribute("ArenaSceneId"), this._arenaSceneId); this._pveSceneId = StrParser.ParseHexInt(element.Attribute("PveSceneId"), this._pveSceneId); this._campaignSceneId = StrParser.ParseHexInt(element.Attribute("CampaignSceneId"), this._campaignSceneId); this._activityCampaignSceneId = StrParser.ParseHexInt(element.Attribute("ActivityCampaignSceneId"), this._activityCampaignSceneId); this._towerSceneId = StrParser.ParseHexInt(element.Attribute("TowerSceneId"), this._towerSceneId); this._selectAvatarSceneId = StrParser.ParseHexInt(element.Attribute("SelectAvatarSceneId"), 0); this._viewBossBattleSceneId = StrParser.ParseHexInt(element.Attribute("ViewBossBattleSceneId"), 0); this._bossBattleSceneId = StrParser.ParseHexInt(element.Attribute("BossBattleSceneId"), 0); this._towerBattleSceneId = StrParser.ParseHexInt(element.Attribute("TowerBattleSceneId"), 0); this._gameMovieSceneId = StrParser.ParseHexInt(element.Attribute("GameMovieSceneId"), 0); this._wolfSmokeSceneId = StrParser.ParseHexInt(element.Attribute("WolfSmokeSceneId"), 0); this._guildPointSceneId = StrParser.ParseHexInt(element.Attribute("GuildPointSceneId"), 0); foreach (SecurityElement element2 in element.Children) { string str; if (((str = element2.Tag) != null) && (str == "SceneSet")) { this.LoadSceneSetFromXml(element2); } } } }
public static RewardGroup LoadXml(SecurityElement element) { RewardGroup group = new RewardGroup { possibility = StrParser.ParseFloat(element.Attribute("Possibility"), 1f), rewardGroupId = StrParser.ParseHexInt(element.Attribute("Id"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "RewardTypeCount") { group.rewardTypeCounts.Add(RewardTypeCount.LoadFromXml(element2)); } else if (tag == "Reward") { goto Label_0096; } } continue; Label_0096: group.rewards.Add(Reward.LoadFromXml(element2)); } } return(group); }
private Position LoadPositionFromXml(SecurityElement element) { Position position = new Position { Id = StrParser.ParseHexInt(element.Attribute("Id"), 0), OpenLevel = StrParser.ParseDecInt(element.Attribute("OpenLevel"), 0), OpenVipLevel = StrParser.ParseDecInt(element.Attribute("OpenVipLevel"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "PositionNum") { PositionNum item = new PositionNum { Level = StrParser.ParseDecInt(element2.Attribute("Level"), 0), OpenNum = StrParser.ParseDecInt(element2.Attribute("OpenNum"), 0) }; position.PositionNums.Add(item); } else if (tag == "Cost") { goto Label_00DE; } } continue; Label_00DE: position.Costs.Add(Cost.LoadFromXml(element2)); } } return(position); }
public BaseInfo LoadBaseInfoFromXml(SecurityElement element) { BaseInfo info = new BaseInfo { SevenDayRefreshTime = StrParser.ParseStr(element.Attribute("SevenDayRefreshTime"), string.Empty), ThreeDayRefreshTime = StrParser.ParseStr(element.Attribute("ThreeDayRefreshTime"), string.Empty), DayRefreshTime = StrParser.ParseDateTime(element.Attribute("DayRefreshTime")), DayReceivedBoxCount = StrParser.ParseDecInt(element.Attribute("DayReceivedBoxCount"), 0), ExploreRankSize = StrParser.ParseDecInt(element.Attribute("ExploreRankSize"), 0), BossHurtRankSize = StrParser.ParseDecInt(element.Attribute("BossHurtRankSize"), 0), GuildProgressRankSize = StrParser.ParseDecInt(element.Attribute("GuildProgressRankSize"), 0), GuildSpeedRankSize = StrParser.ParseDecInt(element.Attribute("GuildSpeedRankSize"), 0), //DayReceivedBoxCount = StrParser.ParseDecInt(element.Attribute("DayReceivedBoxCount"), 0), FreeChallengeCount = StrParser.ParseDecInt(element.Attribute("FreeChallengeCount"), 0), ActivityId = StrParser.ParseHexInt(element.Attribute("ActivityId"), 0), MaxMsgCount = StrParser.ParseDecInt(element.Attribute("MaxMsgCount"), 0), StageResetCount = StrParser.ParseDecInt(element.Attribute("StageResetCount"), 0), TalentResetCount = StrParser.ParseDecInt(element.Attribute("TalentResetCount"), 0), ExploreCostId = StrParser.ParseHexInt(element.Attribute("ExploreCostId"), 0), CompleteBoxIconId = StrParser.ParseHexInt(element.Attribute("CompleteBoxIconId"), 0), UnSearchPassBossIconId = StrParser.ParseHexInt(element.Attribute("UnSearchPassBossIconId"), 0), UnSearchChallengeBossIconId = StrParser.ParseHexInt(element.Attribute("UnSearchChallengeBossIconId"), 0), AdventureIconId = StrParser.ParseHexInt(element.Attribute("AdventureIconId"), 0), GuildBuildIconId = StrParser.ParseHexInt(element.Attribute("GuildBuildIconId"), 0), ShowBossCombatIconTime = StrParser.ParseDecLong(element.Attribute("ShowBossCombatIconTime"), 0L), BoxSendOpen = StrParser.ParseBool(element.Attribute("BoxSendOpen"), false) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag != "BossItemChallenge") { if (tag == "RankValueFix") { goto Label_0274; } if (tag == "TalentMapNumRange") { goto Label_0288; } } else { info.BossItemChallenges.Add(this.LoadBossItemChallenge(element2)); } } continue; Label_0274: info.RankValueFix.Add(this.LoadRankValueFix(element2)); continue; Label_0288: info.TalentMapNumRanges.Add(this.LoadValueRangeFromXml(element2)); } } return(info); }
private Question LoadQuestionFromXml(SecurityElement element) { Question question = new Question { QuestionId = StrParser.ParseHexInt(element.Attribute("QuestionId"), 0), Weight = StrParser.ParseDecInt(element.Attribute("Weight"), 0), Content = StrParser.ParseStr(element.Attribute("Content"), string.Empty), RightAnswer = TypeNameContainer <_AnswerNum> .Parse(element.Attribute("RightAnswer"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "Answer") { question.Answers.Add(this.LoadAnswerFromXml(element2)); } else if (tag == "Reward") { goto Label_00C5; } } continue; Label_00C5: question.Rewards.Add(Reward.LoadFromXml(element2)); } } return(question); }
public override void LoadFromXml(SecurityElement element) { if ((element.Tag == "Dialogue") && (element.Children != null)) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag != "DialogueSet") { if (tag == "PlayerPortraitIcon") { goto Label_0084; } if (tag == "PlayerAssistantPortraitIcon") { goto Label_00A2; } } else { DialogueSet item = this.LoadDialogueSetFromXml(element2); this._dialogueSets.Add(item); } } continue; Label_0084: this.playerPortraitIcons.Add(StrParser.ParseHexInt(element2.Attribute("Id"), 0)); continue; Label_00A2: this.playerAssistantPortraitIcons.Add(StrParser.ParseHexInt(element2.Attribute("Id"), 0)); } } }
private void LoadContinueRewardFromXml(SecurityElement element) { ContinueReward reward = new ContinueReward { ShowIcon = StrParser.ParseHexInt(element.Attribute("ShowIcon"), 0), FixRewardSetId = StrParser.ParseHexInt(element.Attribute("FixRewardSetId"), 0), RandomRewardSetId = StrParser.ParseHexInt(element.Attribute("RandomRewardSetId"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "FixDisplayReward") { reward.FixDisplayRewards.Add(Reward.LoadFromXml(element2)); } else if (tag == "RandomDisplayReward") { goto Label_00A9; } } continue; Label_00A9: reward.RandomDisplayRewards.Add(Reward.LoadFromXml(element2)); } } this._continueRewards = reward; }
private AssetGood LoadAssetGoodFromXml(SecurityElement element) { return(new AssetGood { goodId = StrParser.ParseHexInt(element.Attribute("GoodId"), 0), assetId = StrParser.ParseHexInt(element.Attribute("AssetId"), 0) }); }
private Consumable LoadConsumableFromXml(SecurityElement element) { return(new Consumable { consumable_id = StrParser.ParseHexInt(element.Attribute("consumable_id"), 0), amount = StrParser.ParseDecInt(element.Attribute("amount"), 0) }); }
private Good LoadGoodFromXml(SecurityElement element) { Good good = new Good { id = StrParser.ParseHexInt(element.Attribute("Id"), 0), goodsType = TypeNameContainer <_Goods> .Parse(element.Attribute("GoodsType"), 0), assetIconId = StrParser.ParseHexInt(element.Attribute("AssetIconId"), 0), goodsIndex = StrParser.ParseHexInt(element.Attribute("GoodsIndex"), 0), groupId = StrParser.ParseHexInt(element.Attribute("GroupId"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "Cost") { good.costs.Add(Cost.LoadFromXml(element2)); } else if (tag == "Reward") { goto Label_00D7; } } continue; Label_00D7: good.rewards.Add(Reward.LoadFromXml(element2)); } } return(good); }
private Dan LoadDanFromXml(SecurityElement element) { Dan dan = new Dan { ResourseId = StrParser.ParseHexInt(element.Attribute("ResourseId"), 0), Type = TypeNameContainer <_DanType> .Parse(element.Attribute("Type"), 0), Name = StrParser.ParseStr(element.Attribute("Name"), string.Empty) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "LevelInfo") { dan.LevelInfos.Add(this.LoadLevelInfoFromXml(element2)); } else if (tag == "BreakthoughtInfo") { goto Label_00AE; } } continue; Label_00AE: dan.BreakthoughtInfos.Add(this.LoadBreakthoughtInfoFromXml(element2)); } } return(dan); }
private Partner LoadPartnerFromXml(SecurityElement element) { Partner partner = new Partner { PartnerId = StrParser.ParseHexInt(element.Attribute("PartnerId"), 0), RequirePlayerLevel = StrParser.ParseDecInt(element.Attribute("RequirePlayerLevel"), 0), RequireVipLevel = StrParser.ParseDecInt(element.Attribute("RequireVipLevel"), 0), IsOpen = StrParser.ParseBool(element.Attribute("IsOpen"), false), AffectType = TypeNameContainer <PositionConfig._EmBattleType> .Parse(element.Attribute("AffectType"), 0), PartnerPowerPercent = StrParser.ParseFloat(element.Attribute("PartnerPowerPercent"), 0f) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { if (element2.Tag == "Cost") { Cost item = Cost.LoadFromXml(element2); partner.Costs.Add(item); } if (element2.Tag == "Modifier") { PropertyModifier modifier = PropertyModifier.LoadFromXml(element2); partner.Modifiers.Add(modifier); } } } return(partner); }
private WeaponAsset LoadWeaponAssetFromXml(SecurityElement element) { return(new WeaponAsset { avatarAssetId = StrParser.ParseHexInt(element.Attribute("AvatarAssetId"), 0), mountBone = StrParser.ParseStr(element.Attribute("MountBone"), "") }); }
public static CostAsset LoadCostAssetFromXml(SecurityElement element) { CostAsset asset = new CostAsset { iconId = StrParser.ParseHexInt(element.Attribute("IconId"), 0), type = TypeNameContainer <IDSeg> .Parse(element.Attribute("Type"), 0), count = StrParser.ParseDecInt(element.Attribute("Count"), 0), qualityLevel = StrParser.ParseDecInt(element.Attribute("QualityLevel"), 0), breakThroughLevelFrom = StrParser.ParseDecInt(element.Attribute("BreakThroughLevelFrom"), 0), breakThroughLevelTo = StrParser.ParseDecInt(element.Attribute("BreakThroughLevelTo"), 0) }; switch (asset.type) { case 3: asset._subType = TypeNameContainer <AvatarConfig._AvatarCountryType> .Parse(element.Attribute("SubType"), 0); return(asset); case 4: asset.subType = TypeNameContainer <EquipmentConfig._Type> .Parse(element.Attribute("SubType"), 0); return(asset); case 0x57: asset._subType = TypeNameContainer <DanConfig._DanType> .Parse(element.Attribute("SubType"), 0); return(asset); } return(asset); }
public override void LoadFromXml(SecurityElement element) { if (element.Tag == "TreasureBowlConfig") { this.ActivityId = StrParser.ParseHexInt(element.Attribute("ActivityId"), 0); if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { if (element2.Tag == "OneTreasure") { OneTreasure item = new OneTreasure { Index = StrParser.ParseDecInt(element2.Attribute("Index"), 0), Hours = StrParser.ParseDecInt(element2.Attribute("Hours"), 0), Count = StrParser.ParseDecInt(element2.Attribute("Count"), 0), ExchangeJmpIndex = StrParser.ParseDecInt(element2.Attribute("ExchangeJmpIndex"), 0), NoneExchangeJmpIndex = StrParser.ParseDecInt(element2.Attribute("NoneExchangeJmpIndex"), 0) }; foreach (SecurityElement element3 in element2.Children) { if (element3.Tag == "Cost") { item.Costs.Add(Cost.LoadFromXml(element3)); } if (element3.Tag == "Reward") { item.Reward = Reward.LoadFromXml(element3); } } this._treasureBowlList.Add(item); } } } } }
private OperationItem LoadOperationItemFromXml(SecurityElement element) { OperationItem item = new OperationItem { ItemId = StrParser.ParseHexInt(element.Attribute("ItemId"), 0), ItemName = element.Attribute("ItemName"), ItemIcon = StrParser.ParseHexInt(element.Attribute("ItemIcon"), 0), ItemDesc = element.Attribute("ItemDesc"), CompareType = TypeNameContainer <_ConditionValueCompareType> .GetTypeByName(element.Attribute("CompareType")), CompareValue = StrParser.ParseDecInt(element.Attribute("CompareValue"), 0), CycleMaxCount = StrParser.ParseDecInt(element.Attribute("CycleMaxCount"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string str; if (((str = element2.Tag) != null) && (str == "Reward")) { item.Rewards.Add(LoadRewardFromXml(element2)); } } } return(item); }
private void LoadOperationInfoFromXml(SecurityElement element, Operation operation) { OperationInfo item = new OperationInfo { OperationSubIndex = StrParser.ParseDecInt(element.Attribute("OperationSubIndex"), 0), OperationName = element.Attribute("OperationName") }; operation.OperationIcon = StrParser.ParseHexInt(element.Attribute("OperationIcon"), 0); item.OperationDesc = element.Attribute("OperationDesc"); operation.Priority = StrParser.ParseDecInt(element.Attribute("Priority"), 0); operation.OperationType = TypeNameContainer <_OperationType> .GetTypeByName(element.Attribute("OperationType")); item.AbsolutePurchaseStartTime = element.Attribute("AbsolutePurchaseStartTime"); item.AbsolutePurchaseCloseTime = element.Attribute("AbsolutePurchaseCloseTime"); item.RelativePurchaseStartTime = element.Attribute("RelativePurchaseStartTime"); item.RelativePurchaseCloseTime = element.Attribute("RelativePurchaseCloseTime"); item.AbsolutePickRewardStartTime = element.Attribute("AbsolutePickRewardStartTime"); item.AbsolutePickRewardCloseTime = element.Attribute("AbsolutePickRewardCloseTime"); item.RelativePickRewardStartTime = element.Attribute("RelativePickRewardStartTime"); item.RelativePickRewardCloseTime = element.Attribute("RelativePickRewardCloseTime"); item.RefreshCycle = StrParser.ParseDecInt(element.Attribute("RefreshCycle"), 0); if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string str; if (((str = element2.Tag) != null) && (str == "OperationItem")) { item.OperationItems.Add(this.LoadOperationItemFromXml(element2)); } } } operation.OperationInfos.Add(item); }
private SpecialGood LoadSpecialGoodFromXml(SecurityElement element) { SpecialGood good = new SpecialGood { GoodId = StrParser.ParseHexInt(element.Attribute("GoodId"), 0), IsOpen = StrParser.ParseBool(element.Attribute("IsOpen"), false) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "Cost") { good.Costs.Add(Cost.LoadFromXml(element2)); } else if (tag == "GoodReward") { goto Label_008F; } } continue; Label_008F: good.GoodReward = Reward.LoadFromXml(element2); } } return(good); }
private Equipment LoadEquipmentFromXml(SecurityElement element) { Equipment equipment = new Equipment { id = StrParser.ParseHexInt(element.Attribute("Id"), 0), sortIndex = StrParser.ParseDecInt(element.Attribute("SortIndex"), 0), type = TypeNameContainer <_Type> .Parse(element.Attribute("Type"), 0), qualityLevel = StrParser.ParseDecInt(element.Attribute("QualityLevel"), 0), weaponType = TypeNameContainer <_WeaponType> .Parse(element.Attribute("WeaponType"), 0), activeableAssembleDesc = StrParser.ParseStr(element.Attribute("ActiveableAssembleDesc"), string.Empty, true) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { string tag = element2.Tag; if (tag != null) { if (tag == "EquipmentBreakthrough") { equipment.equipBreakthroughs.Add(this.LoadEquipmentBreakthroughFromXml(element2)); } else if (tag == "GetWay") { goto Label_00F4; } } continue; Label_00F4: equipment.getways.Add(GetWay.LoadFromXml(element2)); } } return(equipment); }
public static GetWay LoadFromXml(SecurityElement element) { return(new GetWay { type = _UIType.ParseUIType(element.Attribute("Type"), 0), data = StrParser.ParseHexInt(element.Attribute("Data"), 0), desc = StrParser.ParseStr(element.Attribute("Desc"), string.Empty) }); }