Exemplo n.º 1
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));
                }
            }
        }
Exemplo n.º 2
0
 private WeaponAsset LoadWeaponAssetFromXml(SecurityElement element)
 {
     return(new WeaponAsset {
         avatarAssetId = StrParser.ParseHexInt(element.Attribute("AvatarAssetId"), 0),
         mountBone = StrParser.ParseStr(element.Attribute("MountBone"), "")
     });
 }
Exemplo n.º 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);
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
 private VipLotteryCount LoadVipLotteryCountFromXml(SecurityElement element)
 {
     return(new VipLotteryCount {
         lotteryIndex = StrParser.ParseDecInt(element.Attribute("LotteryIndex"), 0),
         count = StrParser.ParseDecInt(element.Attribute("Count"), 0)
     });
 }
Exemplo n.º 6
0
 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);
             }
         }
     }
 }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
 private Answer LoadAnswerFromXml(SecurityElement element)
 {
     return(new Answer {
         AnswerNum = TypeNameContainer <_AnswerNum> .Parse(element.Attribute("AnswerNum"), 0),
         Content = StrParser.ParseStr(element.Attribute("Content"), string.Empty)
     });
 }
Exemplo n.º 9
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;
        }
Exemplo n.º 10
0
 public static ClientServerCommon.Attribute LoadFromXml(SecurityElement element)
 {
     return(new ClientServerCommon.Attribute {
         type = TypeNameContainer <_AvatarAttributeType> .Parse(element.Attribute("Type"), 0),
         value = StrParser.ParseDouble(element.Attribute("Value"), 0.0)
     });
 }
Exemplo n.º 11
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);
        }
Exemplo n.º 12
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);
        }
Exemplo n.º 13
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);
        }
Exemplo n.º 14
0
 private Skill LoadSkillFromXml(SecurityElement element)
 {
     return(new Skill {
         id = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         level = StrParser.ParseDecInt(element.Attribute("Level"), 0)
     });
 }
Exemplo n.º 15
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);
        }
Exemplo n.º 16
0
 public static CycleRewardSet LoadFromXml(SecurityElement element)
 {
     return(new CycleRewardSet {
         id = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         showId = StrParser.ParseHexInt(element.Attribute("ShowId"), 0)
     });
 }
Exemplo n.º 17
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);
        }
Exemplo n.º 18
0
        public override void LoadFromXml(SecurityElement element)
        {
            if (element.Tag == "AvatarAssetConfig")
            {
                this._assetPath = StrParser.ParseStr(element.Attribute("AssetPath"), "");
                if (element != null)
                {
                    foreach (SecurityElement element2 in element.Children)
                    {
                        string tag = element2.Tag;
                        if (tag != null)
                        {
                            if (tag == "CommonParts")
                            {
                                this.LoadCommonPartsFromXml(element2);
                            }
                            else if (tag == "AvatarSet")
                            {
                                goto Label_007A;
                            }
                        }
                        continue;
Label_007A:
                        this.LoadAvatarSetFromXml(element2);
                    }
                }
            }
        }
Exemplo n.º 19
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);
        }
Exemplo n.º 20
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)
     });
 }
Exemplo n.º 21
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);
        }
Exemplo n.º 22
0
 private NumberMapping LoadNumberMappingFromXml(SecurityElement element)
 {
     return(new NumberMapping {
         Counter = StrParser.ParseDecInt(element.Attribute("Counter"), 0),
         Number = StrParser.ParseDecInt(element.Attribute("Number"), 0)
     });
 }
Exemplo n.º 23
0
 private VipLimitCount LoadVipLimitCountFromXml(SecurityElement element)
 {
     return(new VipLimitCount {
         type = TypeNameContainer <_VipLimitType> .Parse(element.Attribute("Type"), 0),
         count = StrParser.ParseDecInt(element.Attribute("Count"), 0)
     });
 }
Exemplo n.º 24
0
 private CountLevel LoadCountLevel(SecurityElement element)
 {
     return(new CountLevel {
         GuildLevel = StrParser.ParseDecInt(element.Attribute("GuildLevel"), 0),
         Count = StrParser.ParseDecInt(element.Attribute("Count"), 0)
     });
 }
Exemplo n.º 25
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);
        }
Exemplo n.º 26
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);
        }
Exemplo n.º 27
0
 private SkillUnlockDesc LoadSkillUnlockDescFromXml(SecurityElement element)
 {
     return(new SkillUnlockDesc {
         level = StrParser.ParseDecInt(element.Attribute("Level"), 0),
         unlockDesc = StrParser.ParseStr(element.Attribute("UnlockDesc"), "")
     });
 }
Exemplo n.º 28
0
        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);
        }
Exemplo n.º 29
0
 public static IncreaseString LoadFromXml(SecurityElement element)
 {
     return(new IncreaseString {
         _value = StrParser.ParseStr(element.Attribute("Value"), ""),
         _fromStep = StrParser.ParseDecInt(element.Attribute("FromStep"), 0)
     });
 }
Exemplo n.º 30
0
        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);
        }