Exemplo n.º 1
0
 public AvatarAction.Animation LoadAnimationFromXml(SecurityElement element)
 {
     if (element.Tag != "Animation")
     {
         return(null);
     }
     AvatarAction.Animation animation = new AvatarAction.Animation {
         type = TypeNameContainer <_AnimationType> .Parse(element.Attribute("Type"), 1)
     };
     animation.value     = StrParser.ParseHexInt(element.Attribute("Value"), animation.value);
     animation.animation = StrParser.ParseStr(element.Attribute("Animation"), animation.animation);
     return(animation);
 }
Exemplo n.º 2
0
 private AssetDesc LoadAssetDescFromXml(SecurityElement element)
 {
     return(new AssetDesc {
         id = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         name = StrParser.ParseStr(element.Attribute("Name"), "", true),
         desc = StrParser.ParseStr(element.Attribute("Desc"), "", true),
         extraDesc = StrParser.ParseStr(element.Attribute("ExtraDesc"), "", true),
         icon = StrParser.ParseStr(element.Attribute("Icon"), ""),
         uv = rect.LoadFromXml(element.Attribute("UV")),
         originalIcon = StrParser.ParseStr(element.Attribute("OriginalIcon"), ""),
         outputIcon = StrParser.ParseStr(element.Attribute("OutputIcon"), "")
     });
 }
Exemplo n.º 3
0
 public override void LoadFromXml(SecurityElement element)
 {
     if ((element.Tag == "PowerConfig") && (element.Children != null))
     {
         foreach (SecurityElement element2 in element.Children)
         {
             string str;
             if (((str = element2.Tag) != null) && (str == "CalPower"))
             {
                 this._calPower = StrParser.ParseStr(element2.Text, "");
             }
         }
     }
 }
Exemplo n.º 4
0
 private void LoadDanAttrInfosFromXml(SecurityElement element)
 {
     if (element.Children != null)
     {
         foreach (SecurityElement element2 in element.Children)
         {
             string str;
             if (((str = element2.Tag) != null) && (str == "DanAttribute"))
             {
                 this.DanAttrInfos.Add(StrParser.ParseStr(element2.Attribute("attrInfos"), ""));
             }
         }
     }
 }
Exemplo n.º 5
0
        private Refresh loadRefreshFromXml(SecurityElement element)
        {
            Refresh refresh = new Refresh {
                refreshId        = StrParser.ParseHexInt(element.Attribute("RefreshId"), 0),
                refreshName      = StrParser.ParseStr(element.Attribute("RefreshName"), ""),
                iconId           = StrParser.ParseHexInt(element.Attribute("IconId"), 0),
                backgroundIconId = StrParser.ParseHexInt(element.Attribute("BackgroundIconId"), 0),
                vipLevel         = StrParser.ParseDecInt(element.Attribute("VipLevel"), 0),
                priority         = StrParser.ParseDecInt(element.Attribute("Priority"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    Counter counter;
                    string  tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "Cost")
                        {
                            if (tag == "CardPack")
                            {
                                goto Label_010A;
                            }
                            if (tag == "Counter")
                            {
                                goto Label_0128;
                            }
                        }
                        else
                        {
                            refresh.cost = Cost.LoadFromXml(element2);
                        }
                    }
                    continue;
Label_010A:
                    refresh.cardPackIDs.Add(StrParser.ParseHexInt(element2.Attribute("CardPackId"), 0));
                    continue;
Label_0128:
                    counter           = new Counter();
                    counter.counterId = StrParser.ParseHexInt(element2.Attribute("CounterId"), 0);
                    counter.activateNeedRefreshTime = StrParser.ParseDecInt(element2.Attribute("ActivateNeedRefreshTime"), 0);
                    counter.closeNeedActivateTime   = StrParser.ParseDecInt(element2.Attribute("CloseNeedActivateTime"), 0);
                    counter.cardPackId = StrParser.ParseHexInt(element2.Attribute("CardPackId"), 0);
                    refresh.counters.Add(counter);
                }
            }
            return(refresh);
        }
Exemplo n.º 6
0
 private SubType LoadSubTypeFromXml(SecurityElement element)
 {
     if (element.Tag != "SubType")
     {
         return(null);
     }
     return(new SubType {
         id = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         name = StrParser.ParseStr(element.Attribute("Name"), "", true),
         desc = StrParser.ParseStr(element.Attribute("Desc"), "", true),
         gotoUI = TypeNameContainer <_UIType> .Parse(element.Attribute("GoToUI"), 0),
         handBookParam = StrParser.ParseHexInt(element.Attribute("HandBookParam"), 0)
     });
 }
Exemplo n.º 7
0
        private MonthCard LoadMonthCardFromXml(SecurityElement element)
        {
            MonthCard card = new MonthCard {
                id = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                monthCardIconId = StrParser.ParseHexInt(element.Attribute("MonthCardIconId"), 0),
                type            = TypeNameContainer <MonthCardType> .Parse(element.Attribute("Type"), 0),
                name            = StrParser.ParseStr(element.Attribute("Name"), ""),
                introduce       = StrParser.ParseStr(element.Attribute("Introduce"), "", true),
                remainDaysLimit = StrParser.ParseDecInt(element.Attribute("RemainDaysLimit"), 0),
                durationDay     = StrParser.ParseDecInt(element.Attribute("DurationDay"), 0),
                rmb             = StrParser.ParseDecInt(element.Attribute("Rmb"), 0),
                freeTimes       = StrParser.ParseDecInt(element.Attribute("FreeTimes"), 0),
                isShow          = StrParser.ParseBool(element.Attribute("IsShow"), false),
                goodsId         = StrParser.ParseHexInt(element.Attribute("GoodsId"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "BuyReward")
                        {
                            if (tag == "TenTimesReward")
                            {
                                goto Label_0173;
                            }
                            if (tag == "DailyReward")
                            {
                                goto Label_0182;
                            }
                        }
                        else
                        {
                            card.buyRewardAndIcon = this.LoadMonthCardRewardAndIconFromXml(element2);
                        }
                    }
                    continue;
Label_0173:
                    card.tenRewardAndIcon = this.LoadMonthCardRewardAndIconFromXml(element2);
                    continue;
Label_0182:
                    card.dailyRewardAndIcon = this.LoadMonthCardRewardAndIconFromXml(element2);
                }
            }
            return(card);
        }
Exemplo n.º 8
0
        private Stage LoadStageFromXml(SecurityElement element)
        {
            Stage stage = new Stage {
                StageId        = StrParser.ParseHexInt(element.Attribute("StageId"), 0),
                StageName      = StrParser.ParseStr(element.Attribute("StageName"), ""),
                StageSequence  = StrParser.ParseDecInt(element.Attribute("StageSequence"), 0),
                IsUseRobot     = StrParser.ParseBool(element.Attribute("IsUseRobot"), false),
                EnemyRecoverHp = StrParser.ParseFloat(element.Attribute("EnemyRecoverHp"), 0f),
                RobotName      = StrParser.ParseStr(element.Attribute("RobotName"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "PassRewards")
                        {
                            if (element2.Children != null)
                            {
                                foreach (SecurityElement element3 in element2.Children)
                                {
                                    Reward item = Reward.LoadFromXml(element3);
                                    stage.PassRewards.Add(item);
                                }
                            }
                        }
                        else if (tag == "FirstPassRewards")
                        {
                            goto Label_014F;
                        }
                    }
                    continue;
Label_014F:
                    if (element2.Children != null)
                    {
                        foreach (SecurityElement element4 in element2.Children)
                        {
                            Reward reward2 = Reward.LoadFromXml(element4);
                            stage.FirstPassRewards.Add(reward2);
                        }
                    }
                }
            }
            return(stage);
        }
Exemplo n.º 9
0
        public override void LoadFromXml(SecurityElement element)
        {
            if (element.Tag == "ClientConfig")
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "ServerIP")
                        {
                            if (tag == "ServerPort")
                            {
                                goto Label_0099;
                            }
                            if (tag == "AuthServerIP")
                            {
                                goto Label_00B2;
                            }
                            if (tag == "AuthServerPort")
                            {
                                goto Label_00CB;
                            }
                            if (tag == "Version")
                            {
                                goto Label_00E4;
                            }
                        }
                        else
                        {
                            this._serverIP = StrParser.ParseStr(element2.Text, this._serverIP);
                        }
                    }
                    continue;
Label_0099:
                    this._serverPort = StrParser.ParseDecInt(element2.Text, this._serverPort);
                    continue;
Label_00B2:
                    this._authServerIP = StrParser.ParseStr(element2.Text, this._authServerIP);
                    continue;
Label_00CB:
                    this._authServerPort = StrParser.ParseDecInt(element2.Text, this._authServerPort);
                    continue;
Label_00E4:
                    this._version = StrParser.ParseStr(element2.Text, this._version);
                }
            }
        }
Exemplo n.º 10
0
 private void LoadSceneSetFromXml(SecurityElement element)
 {
     foreach (SecurityElement element2 in element.Children)
     {
         if (element2.Tag == "Scene")
         {
             Scene item = new Scene {
                 id        = StrParser.ParseHexInt(element2.Attribute("Id"), 0),
                 levelName = StrParser.ParseStr(element2.Attribute("LevelName"), ""),
                 BGM       = StrParser.ParseStr(element2.Attribute("BGM"), ""),
                 bgMusic   = StrParser.ParseStr(element2.Attribute("BgMusic"), "")
             };
             this.scenes.Add(item);
         }
     }
 }
Exemplo n.º 11
0
        private BreakthoughtDetial LoadBreakthoughtDetialFromXml(SecurityElement element)
        {
            BreakthoughtDetial detial = new BreakthoughtDetial {
                LevelBefore            = StrParser.ParseDecInt(element.Attribute("LevelBefore"), 0),
                BreakthoughtResultDesc = StrParser.ParseStr(element.Attribute("BreakthoughtResultDesc"), string.Empty)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                }
            }
            return(detial);
        }
Exemplo n.º 12
0
        private Illusion LoadIllusionFromXml(SecurityElement element)
        {
            Illusion illusion = new Illusion {
                Id              = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                ContinueTime    = StrParser.ParseDecInt(element.Attribute("ContinueTime"), 0),
                ModelId         = StrParser.ParseHexInt(element.Attribute("ModelId"), 0),
                GetWay          = StrParser.ParseStr(element.Attribute("GetWay"), ""),
                ModifierSetDesc = StrParser.ParseStr(element.Attribute("ModifierSetDesc"), "", true),
                SortIndex       = StrParser.ParseDecInt(element.Attribute("SortIndex"), 0),
                IllusionPower   = StrParser.ParseFloat(element.Attribute("IllusionPower"), 0f)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    PropertyModifier modifier;
                    string           tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "Cost")
                        {
                            if (tag == "PropertyModifier")
                            {
                                goto Label_011E;
                            }
                            if (tag == "DanAttributeId")
                            {
                                goto Label_0133;
                            }
                        }
                        else
                        {
                            illusion.ActivateCost = Cost.LoadFromXml(element2);
                        }
                    }
                    continue;
Label_011E:
                    modifier = PropertyModifier.LoadFromXml(element2);
                    illusion.IllusionModifers.Add(modifier);
                    continue;
Label_0133:
                    illusion.DanAttributeIds.Add(StrParser.ParseHexInt(element2.Text, 0));
                }
            }
            return(illusion);
        }
Exemplo n.º 13
0
 private void LoadTaskGuidSetFromXml(SecurityElement element)
 {
     if (element.Children != null)
     {
         foreach (SecurityElement element2 in element.Children)
         {
             if (element2.Tag == "TaskGuid")
             {
                 TaskGuid item = new TaskGuid {
                     TaskType        = TypeNameContainer <_TaskType> .Parse(element2.Attribute("Type"), 0),
                     AttachConParent = StrParser.ParseStr(element2.Attribute("AttachComponentParent"), string.Empty)
                 };
                 this._taskGuids.Add(item);
             }
         }
     }
 }
Exemplo n.º 14
0
        private GuildExchangeGoods LoadExchangGoodsFromXml(SecurityElement element)
        {
            GuildExchangeGoods goods = new GuildExchangeGoods {
                GoodsId                = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                ShowIndex              = StrParser.ParseDecInt(element.Attribute("ShowIndex"), 0),
                ActiveConditionType    = TypeNameContainer <_ActiveConditionType> .Parse(element.Attribute("ActiveConditionType"), 0),
                ActiveConditionValue   = StrParser.ParseStr(element.Attribute("ActiveConditionValue"), ""),
                ExistTimeMs            = StrParser.ParseDecInt(element.Attribute("ExistTimeMs"), 0),
                BuyCountLimitPerActive = StrParser.ParseDecInt(element.Attribute("BuyCountLimitPerActive"), 0),
                ConditionDesc          = StrParser.ParseStr(element.Attribute("ConditionDesc"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "CostAsset")
                        {
                            if (tag == "ItemEx")
                            {
                                goto Label_011A;
                            }
                            if (tag == "Reward")
                            {
                                goto Label_012D;
                            }
                        }
                        else
                        {
                            goods.CostAssets.Add(CostAsset.LoadCostAssetFromXml(element2));
                        }
                    }
                    continue;
Label_011A:
                    goods.Costs.Add(ItemEx.LoadItemExFromXml(element2));
                    continue;
Label_012D:
                    goods.Reward = Reward.LoadFromXml(element2);
                }
            }
            return(goods);
        }
Exemplo n.º 15
0
 private SubGoodInfo LoadSubGoodInfoFromXml(SecurityElement element)
 {
     if (element == null)
     {
         return(null);
     }
     return(new SubGoodInfo {
         deviceType = _DeviceType.ParseAppGoodChannelType(element.Attribute("DeviceType"), 0),
         name = StrParser.ParseStr(element.Attribute("Name"), ""),
         minDisplayVIPLevel = StrParser.ParseDecInt(element.Attribute("MinDisplayVIPLevel"), 0),
         hideInApple = StrParser.ParseBool(element.Attribute("HideInApple"), false),
         costRMB = StrParser.ParseDecInt(element.Attribute("CostRMB"), 0),
         realMoneyCount = StrParser.ParseDecInt(element.Attribute("RealMoneyCount"), 0),
         realMoneyCountExtra = StrParser.ParseDecInt(element.Attribute("RealMoneyCountExtra"), 0),
         desc = StrParser.ParseStr(element.Attribute("Desc"), ""),
         firstMultiple = StrParser.ParseDecInt(element.Attribute("FirstMultiple"), 1),
         productId = StrParser.ParseStr(element.Attribute("ProductId"), "")
     });
 }
Exemplo n.º 16
0
        private UpgradeReward LoadUpgradeRewardFromXml(SecurityElement element)
        {
            UpgradeReward reward = new UpgradeReward {
                id    = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                level = StrParser.ParseDecInt(element.Attribute("Level"), 0)
            };

            foreach (SecurityElement element2 in element.Children)
            {
                if (element2.Tag == "Reward")
                {
                    reward.rewards.Add(Reward.LoadFromXml(element2));
                }
            }
            reward.iconId = StrParser.ParseHexInt(element.Attribute("IconId"), 0);
            reward.title  = StrParser.ParseStr(element.Attribute("Title"), "");
            reward.desc   = StrParser.ParseStr(element.Attribute("Desc"), "");
            return(reward);
        }
Exemplo n.º 17
0
        private Avatar LoadAvatarFromXml(SecurityElement element)
        {
            Avatar avatar = new Avatar {
                typeId   = StrParser.ParseHexInt(element.Attribute("TypeId"), 0),
                skeleton = StrParser.ParseStr(element.Attribute("Skeleton"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "Part")
                    {
                        avatar.parts.Add(this.LoadPartFromXml(element2, avatar));
                    }
                }
            }
            return(avatar);
        }
Exemplo n.º 18
0
 private ClientServerCommon.MainType LoadMainTypeFromXml(SecurityElement element)
 {
     ClientServerCommon.MainType type = new ClientServerCommon.MainType {
         id   = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         name = StrParser.ParseStr(element.Attribute("Name"), "", true)
     };
     if (element.Children != null)
     {
         foreach (SecurityElement element2 in element.Children)
         {
             ClientServerCommon.SubType item = this.LoadSubTypeFromXml(element2);
             if (item != null)
             {
                 type.subTypes.Add(item);
             }
         }
     }
     return(type);
 }
Exemplo n.º 19
0
        private Floor LoadFloorFromXml(SecurityElement element)
        {
            if (element.Tag != "Floor")
            {
                return(null);
            }
            Floor floor = new Floor {
                Layer          = StrParser.ParseDecInt(element.Attribute("Layer"), 0),
                Icon           = StrParser.ParseStr(element.Attribute("IconId"), string.Empty),
                Guide          = StrParser.ParseStr(element.Attribute("Guide"), string.Empty, true),
                CombatMaxRound = StrParser.ParseDecInt(element.Attribute("CombatMaxRound"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "PassReward")
                        {
                            foreach (SecurityElement element3 in element2.Children)
                            {
                                floor.PassReward.Add(Reward.LoadFromXml(element3));
                            }
                        }
                        else if (tag == "FirstPassReward")
                        {
                            goto Label_0125;
                        }
                    }
                    continue;
Label_0125:
                    foreach (SecurityElement element4 in element2.Children)
                    {
                        floor.FirstPassReward.Add(Reward.LoadFromXml(element4));
                    }
                }
            }
            return(floor);
        }
Exemplo n.º 20
0
        private GuildPublicGoods LoadGuildPublicGoodsFromXml(SecurityElement element)
        {
            GuildPublicGoods goods = new GuildPublicGoods {
                GoodsId     = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                GoodsName   = StrParser.ParseStr(element.Attribute("Name"), ""),
                GoodsIconId = StrParser.ParseHexInt(element.Attribute("IconId"), 0),
                ShowIndex   = StrParser.ParseDecInt(element.Attribute("ShowIndex"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "GoodsCount")
                        {
                            if (tag == "Cost")
                            {
                                goto Label_00D2;
                            }
                            if (tag == "Reward")
                            {
                                goto Label_00E5;
                            }
                        }
                        else
                        {
                            goods.CountLevels.Add(this.LoadCountLevel(element2));
                        }
                    }
                    continue;
Label_00D2:
                    goods.Costs.Add(Cost.LoadFromXml(element2));
                    continue;
Label_00E5:
                    goods.Rewards.Add(Reward.LoadFromXml(element2));
                }
            }
            return(goods);
        }
Exemplo n.º 21
0
 private Dialogues LoadDialoguesFromXml(SecurityElement element, int dialogueIndex)
 {
     return(new Dialogues {
         dialogueIndex = dialogueIndex,
         dialogueCampType = TypeNameContainer <_CampType> .Parse(element.Attribute("DialogueCampType"), 0),
         positionType = TypeNameContainer <_PositionType> .Parse(element.Attribute("PositionType"), 0),
         portraitType = TypeNameContainer <_PortraitType> .Parse(element.Attribute("PortraitType"), 0),
         portraitDisplayType = TypeNameContainer <_PortraitDisplayType> .Parse(element.Attribute("PortraitDisplayType"), 0),
         avatarId = StrParser.ParseHexInt(element.Attribute("AvatarId"), 0),
         portraitAnimation = StrParser.ParseStr(element.Attribute("PortraitAnimation"), ""),
         portraitName = StrParser.ParseStr(element.Attribute("PortraitName"), "", true),
         npcId = StrParser.ParseHexInt(element.Attribute("NpcId"), 0),
         npcStageIndex = StrParser.ParseDecInt(element.Attribute("NpcStageIndex"), 0),
         npcTeamIndex = StrParser.ParseDecInt(element.Attribute("NpcTeamIndex"), 0),
         npcIndex = StrParser.ParseDecInt(element.Attribute("NpcIndex"), 0),
         avatarAnimation = StrParser.ParseStr(element.Attribute("AvatarAnimation"), ""),
         dialogueValue = StrParser.ParseStr(element.Attribute("DialogueValue"), "", true),
         portraitIconIndex = StrParser.ParseDecInt(element.Attribute("PortraitIconIndex"), 0)
     });
 }
Exemplo n.º 22
0
        public Refresh LoadRefreshFromXml(SecurityElement element)
        {
            Refresh refresh = new Refresh {
                RefreshId   = StrParser.ParseHexInt(element.Attribute("RefreshId"), 0),
                OperateType = TypeNameContainer <_OperateType> .Parse(element.Attribute("OperateType"), 0),
                RefreshType = TypeNameContainer <_RefreshType> .Parse(element.Attribute("RefreshType"), 0),
                RefreshName = StrParser.ParseStr(element.Attribute("RefreshName"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    Counter counter;
                    string  tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Cost")
                        {
                            refresh.Cost = new Cost();
                            refresh.Cost = Cost.LoadFromXml(element2);
                        }
                        else if (tag == "Counter")
                        {
                            goto Label_00D9;
                        }
                    }
                    continue;
Label_00D9:
                    counter                      = new Counter();
                    counter.CounterId            = StrParser.ParseHexInt(element2.Attribute("CounterId"), 0);
                    counter.NeedRefreshTimes     = StrParser.ParseDecInt(element2.Attribute("NeedRefreshTimes"), 0);
                    counter.CloseActivatedTimes  = StrParser.ParseDecInt(element2.Attribute("CloseActivatedTimes"), 0);
                    counter.EffectiveProbability = StrParser.ParseDouble(element2.Attribute("EffectiveProbability"), 0.0);
                    counter.CardPackId           = StrParser.ParseHexInt(element2.Attribute("CardPackId"), 0);
                    counter.IsShowCounter        = StrParser.ParseBool(element2.Attribute("IsShowCounter"), false);
                    refresh.Counters.Add(counter);
                }
            }
            return(refresh);
        }
Exemplo n.º 23
0
        private CombineSetting LoadCombineSettingFromXml(SecurityElement element)
        {
            CombineSetting setting = new CombineSetting {
                outputIcon = StrParser.ParseStr(element.Attribute("OutputIcon"), "").ToLower(),
                combine    = StrParser.ParseBool(element.Attribute("Combine"), false)
            };

            setting.maxCombinedTextureSize = StrParser.ParseDecInt(element.Attribute("MaxCombinedTextureSize"), setting.maxCombinedTextureSize);
            setting.textureFormat          = StrParser.ParseStr(element.Attribute("TextureFormat"), "");
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "QualitySetting")
                    {
                        setting.qualitySettings.Add(this.LoadQualitySettingFromXml(element2));
                    }
                }
            }
            return(setting);
        }
Exemplo n.º 24
0
        private EmBattleAttribute LoadEmBattleAttributeFromXml(SecurityElement element)
        {
            EmBattleAttribute attribute = new EmBattleAttribute {
                type = TypeNameContainer <_EmBattleType> .Parse(element.Attribute("Type"), 0),
                desc = StrParser.ParseStr(element.Attribute("Desc"), "", true)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "PropertyModifier"))
                    {
                        PropertyModifier item = PropertyModifier.LoadFromXml(element2);
                        attribute.modifiers.Add(item);
                    }
                }
            }
            return(attribute);
        }
Exemplo n.º 25
0
        private PlayerLevel LoadPlayerLevelFromXml(SecurityElement element)
        {
            PlayerLevel level = new PlayerLevel {
                playerLevel  = StrParser.ParseDecInt(element.Attribute("PlayerLevel"), 0),
                levelUpDesc  = StrParser.ParseStr(element.Attribute("LevelUpDesc"), ""),
                linkedUIType = TypeNameContainer <_UIType> .Parse(element.Attribute("LinkedUIType"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "FunctionInfo"))
                    {
                        level.functionInfos.Add(this.LoadFunctionInfoFromXml(element2));
                    }
                }
            }
            return(level);
        }
Exemplo n.º 26
0
        private Part LoadPartFromXml(SecurityElement element, Avatar avatar)
        {
            Part part = new Part {
                Avatar       = avatar,
                typeId       = StrParser.ParseHexInt(element.Attribute("TypeId"), 0),
                assembleType = TypeNameContainer <_AssembleType> .Parse(element.Attribute("AssembleType"), 0),
                mountMarker  = StrParser.ParseStr(element.Attribute("MountMarker"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "Component")
                    {
                        part.components.Add(this.LoadComponentFromXml(element2, part));
                    }
                }
            }
            return(part);
        }
Exemplo n.º 27
0
        private EmBattleAttribute LoadAdditionsFromXml(SecurityElement element)
        {
            EmBattleAttribute attribute = new EmBattleAttribute {
                type = TypeNameContainer <PositionConfig._EmBattleType> .Parse(element.Attribute("AffectType"), 0),
                name = StrParser.ParseStr(element.Attribute("Name"), null),
                desc = StrParser.ParseStr(element.Attribute("Desc"), null)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "PropertyModifier")
                    {
                        PropertyModifier item = PropertyModifier.LoadFromXml(element2);
                        attribute.modifiers.Add(item);
                    }
                }
            }
            return(attribute);
        }
Exemplo n.º 28
0
        public override void LoadFromXml(SecurityElement element)
        {
            if (element.Tag == "SevenElevenGiftConfig")
            {
                this._activityId = StrParser.ParseHexInt(element.Attribute("ActivityId"), 0);
                this._bridefDesc = StrParser.ParseStr(element.Attribute("BridefDesc"), string.Empty, true);
                this._minuteDesc = StrParser.ParseStr(element.Attribute("MinuteDesc"), string.Empty, true);
                if (element.Children != null)
                {
                    foreach (SecurityElement element2 in element.Children)
                    {
                        string tag = element2.Tag;
                        if (tag != null)
                        {
                            if (tag != "NumberPosition")
                            {
                                if (tag == "NumberConvert")
                                {
                                    goto Label_00CE;
                                }
                                if (tag == "RewardCounter")
                                {
                                    goto Label_00E2;
                                }
                            }
                            else
                            {
                                this._numberPositions.Add(this.LoadNumberPositionFromXml(element2));
                            }
                        }
                        continue;
Label_00CE:
                        this._numberConverts.Add(this.LoadNumberConvertFromXml(element2));
                        continue;
Label_00E2:
                        this._rewardCounters.Add(this.LoadRewardCounterFromXml(element2));
                    }
                }
            }
        }
Exemplo n.º 29
0
 public override void LoadFromXml(SecurityElement element)
 {
     if ((element.Tag == "ClientManifest") && (element.Children != null))
     {
         foreach (SecurityElement element2 in element.Children)
         {
             if (element2.Tag == "FileInfo")
             {
                 FileInfo item = new FileInfo {
                     assetName = StrParser.ParseStr(element2.Attribute("AssetName"), "")
                 };
                 item.revision             = StrParser.ParseDecInt(element2.Attribute("Revision"), item.revision);
                 item.fileName             = StrParser.ParseStr(element2.Attribute("FileName"), "");
                 item.fileSize             = StrParser.ParseDecInt(element2.Attribute("FileSize"), item.fileSize);
                 item.uncompressedFileSize = StrParser.ParseDecInt(element2.Attribute("UncompressedFileSize"), item.uncompressedFileSize);
                 item.isStreamAsset        = StrParser.ParseBool(element2.Attribute("IsStreamAsset"), false);
                 item.keepFileName         = StrParser.ParseBool(element2.Attribute("KeepFileName"), false);
                 this._fileInfos.Add(item);
             }
         }
     }
 }
Exemplo n.º 30
0
        private WeekRewardShow LoadWeekRewardFromXml(SecurityElement element)
        {
            if (element.Tag != "WeekReward")
            {
                return(null);
            }
            WeekRewardShow show = new WeekRewardShow {
                From = StrParser.ParseStr(element.Attribute("From"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "ShowReward"))
                    {
                        show.RewardShow.Add(this.LoadWeekRewardShowFromXml(element2));
                    }
                }
            }
            return(show);
        }