Example #1
0
 public TalentValue LoadTalentValueFromXml(SecurityElement element)
 {
     return(new TalentValue {
         Level = StrParser.ParseDecInt(element.Attribute("Level"), 0),
         Value = StrParser.ParseDouble(element.Attribute("Value"), 0.0)
     });
 }
Example #2
0
        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);
        }
Example #3
0
        private SkillUpgrade LoadSkillUpgradeFromXml(SecurityElement element)
        {
            SkillUpgrade upgrade = new SkillUpgrade {
                upgrateExperiences = StrParser.ParseDecInt(element.Attribute("UpgrateExperience"), 0),
                supplyExperiences  = StrParser.ParseDecInt(element.Attribute("SupplyExperience"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "SellReward")
                        {
                            upgrade.sellRewards.Add(Reward.LoadFromXml(element2));
                        }
                        else if (tag == "UpgrateCost")
                        {
                            goto Label_0092;
                        }
                    }
                    continue;
Label_0092:
                    upgrade.upgrateCosts.Add(Cost.LoadFromXml(element2));
                }
            }
            return(upgrade);
        }
Example #4
0
        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);
        }
Example #5
0
 private VipLimitCount LoadVipLimitCountFromXml(SecurityElement element)
 {
     return(new VipLimitCount {
         type = TypeNameContainer <_VipLimitType> .Parse(element.Attribute("Type"), 0),
         count = StrParser.ParseDecInt(element.Attribute("Count"), 0)
     });
 }
Example #6
0
        private LevelInfo LoadLevelInfoFromXml(SecurityElement element)
        {
            LevelInfo info = new LevelInfo {
                Breakthought      = StrParser.ParseDecInt(element.Attribute("Breakthought"), 0),
                Level             = StrParser.ParseDecInt(element.Attribute("Level"), 0),
                LevelUpResultDesc = StrParser.ParseStr(element.Attribute("LevelUpResultDesc"), string.Empty)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "MoneyCost")
                        {
                            info.MoneyCost = Cost.LoadFromXml(element2);
                        }
                        else if (tag == "Cost")
                        {
                            goto Label_00A5;
                        }
                    }
                    continue;
Label_00A5:
                    info.Costs.Add(Cost.LoadFromXml(element2));
                }
            }
            return(info);
        }
 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);
             }
         }
     }
 }
Example #8
0
        public override void LoadFromXml(SecurityElement element)
        {
            if (element.Tag == "AppleGoodConfig")
            {
                this._currencyType = TypeNameContainer <_CurrencyType> .Parse(element.Attribute("CurrencyType"), 0);

                this._multiplyingPower = StrParser.ParseDecInt(element.Attribute("MultiplyingPower"), 1);
                if (element.Children != null)
                {
                    foreach (SecurityElement element2 in element.Children)
                    {
                        string tag = element2.Tag;
                        if (tag != null)
                        {
                            if (tag == "GoodInfo")
                            {
                                this._goodInfos.Add(this.LoadGoodInfoFromXml(element2));
                            }
                            else if (tag == "Reward")
                            {
                                goto Label_00A0;
                            }
                        }
                        continue;
Label_00A0:
                        this._firstRewards.Add(Reward.LoadFromXml(element2));
                    }
                }
            }
        }
Example #9
0
 public QualityWeight LoadQualityWeightFromXml(SecurityElement element)
 {
     return(new QualityWeight {
         Quality = StrParser.ParseDecInt(element.Attribute("Quality"), 0),
         Weight = StrParser.ParseDecInt(element.Attribute("Weight"), 0)
     });
 }
Example #10
0
        private Animation LoadAnimationFromXml(SecurityElement element)
        {
            Animation animation = new Animation {
                name           = StrParser.ParseStr(element.Attribute("Name"), ""),
                assetName      = StrParser.ParseStr(element.Attribute("AssetName"), ""),
                startFrame     = StrParser.ParseDecInt(element.Attribute("StartFrame"), 0),
                endFrame       = StrParser.ParseDecInt(element.Attribute("EndFrame"), 0),
                moveStartFrame = StrParser.ParseDecInt(element.Attribute("MoveStartFrame"), 0),
                moveEndFrame   = StrParser.ParseDecInt(element.Attribute("MoveEndFrame"), 0),
                speed          = StrParser.ParseFloat(element.Attribute("Speed"), 1f)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "Event")
                    {
                        Event item = new Event {
                            id       = StrParser.ParseDecInt(element2.Attribute("Id"), 0),
                            keyFrame = StrParser.ParseDecInt(element2.Attribute("KeyFrame"), 0)
                        };
                        animation.events.Add(item);
                    }
                }
            }
            return(animation);
        }
Example #11
0
        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);
        }
Example #12
0
        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);
        }
Example #13
0
        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);
        }
Example #14
0
 public ValueRange LoadValueRangeFromXml(SecurityElement element)
 {
     return(new ValueRange {
         Min = StrParser.ParseDecInt(element.Attribute("Min"), 0),
         Max = StrParser.ParseDecInt(element.Attribute("Max"), 0)
     });
 }
 private NumberMapping LoadNumberMappingFromXml(SecurityElement element)
 {
     return(new NumberMapping {
         Counter = StrParser.ParseDecInt(element.Attribute("Counter"), 0),
         Number = StrParser.ParseDecInt(element.Attribute("Number"), 0)
     });
 }
Example #16
0
 public void LoadQualityWeightInfosFromXml(SecurityElement element)
 {
     if (element.Children != null)
     {
         foreach (SecurityElement element2 in element.Children)
         {
             string str;
             if (((str = element2.Tag) != null) && (str == "QualityWeightInfo"))
             {
                 QualityWeightInfo item = new QualityWeightInfo {
                     Place       = StrParser.ParseDecInt(element2.Attribute("Place"), 0),
                     RefreshType = TypeNameContainer <_RefreshType> .Parse(element2.Attribute("RefreshType"), 0)
                 };
                 foreach (SecurityElement element3 in element2.Children)
                 {
                     string str2;
                     if (((str2 = element3.Tag) != null) && (str2 == "QualityWeight"))
                     {
                         item.QualityWeights.Add(this.LoadQualityWeightFromXml(element3));
                     }
                 }
                 this._qualityWeightInfos.Add(item);
             }
         }
     }
 }
Example #17
0
 private CountLevel LoadCountLevel(SecurityElement element)
 {
     return(new CountLevel {
         GuildLevel = StrParser.ParseDecInt(element.Attribute("GuildLevel"), 0),
         Count = StrParser.ParseDecInt(element.Attribute("Count"), 0)
     });
 }
Example #18
0
        private void LoadWolfShopFromXml(SecurityElement element)
        {
            WolfShop shop = new WolfShop();

            this.Shop = shop;
            this.Shop.MaxGoodsCount = StrParser.ParseDecInt(element.Attribute("MaxGoodsCount"), 0);
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "RefreshCost")
                        {
                            Cost item = Cost.LoadFromXml(element2);
                            this.Shop.RefreshCost.Add(item);
                        }
                        else if (tag == "Goods")
                        {
                            goto Label_0091;
                        }
                    }
                    continue;
Label_0091:
                    this.Shop.Goods.Add(this.LoadGoodsFromXml(element2));
                }
            }
        }
Example #19
0
        private AttributeRefreshCost LoadAttributeRefreshCostFromXml(SecurityElement element)
        {
            AttributeRefreshCost cost = new AttributeRefreshCost {
                Breakthought = StrParser.ParseDecInt(element.Attribute("Breakthought"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "MoneyCost")
                        {
                            cost.MoneyCost = Cost.LoadFromXml(element2);
                        }
                        else if (tag == "Cost")
                        {
                            goto Label_0073;
                        }
                    }
                    continue;
Label_0073:
                    cost.Costs.Add(Cost.LoadFromXml(element2));
                }
            }
            return(cost);
        }
Example #20
0
 private Skill LoadSkillFromXml(SecurityElement element)
 {
     return(new Skill {
         id = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         level = StrParser.ParseDecInt(element.Attribute("Level"), 0)
     });
 }
Example #21
0
        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);
        }
Example #22
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);
        }
Example #23
0
        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);
        }
Example #24
0
        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);
        }
Example #25
0
 private VipLotteryCount LoadVipLotteryCountFromXml(SecurityElement element)
 {
     return(new VipLotteryCount {
         lotteryIndex = StrParser.ParseDecInt(element.Attribute("LotteryIndex"), 0),
         count = StrParser.ParseDecInt(element.Attribute("Count"), 0)
     });
 }
Example #26
0
        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);
        }
Example #27
0
 private SkillUnlockDesc LoadSkillUnlockDescFromXml(SecurityElement element)
 {
     return(new SkillUnlockDesc {
         level = StrParser.ParseDecInt(element.Attribute("Level"), 0),
         unlockDesc = StrParser.ParseStr(element.Attribute("UnlockDesc"), "")
     });
 }
Example #28
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)
     });
 }
Example #29
0
 public static IncreaseString LoadFromXml(SecurityElement element)
 {
     return(new IncreaseString {
         _value = StrParser.ParseStr(element.Attribute("Value"), ""),
         _fromStep = StrParser.ParseDecInt(element.Attribute("FromStep"), 0)
     });
 }
Example #30
0
        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);
        }