Ejemplo n.º 1
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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        public AvatarAction.Effect LoadEffectFromXml(SecurityElement element)
        {
            AvatarAction.Effect effect = new AvatarAction.Effect();
            effect.type = TypeNameContainer <AvatarAction.Effect._Type> .Parse(element.Attribute("Type"), effect.type);

            effect.isGetHitFX         = StrParser.ParseBool(element.Attribute("IsGetHitFX"), effect.isGetHitFX);
            effect.pfx_PlayOnTarget   = StrParser.ParseBool(element.Attribute("PlayOnTarget"), effect.pfx_PlayOnTarget);
            effect.pfx_PlayTargetType = TypeNameContainer <AvatarAction.Effect._PlayTargetType> .Parse(element.Attribute("PlayTargetType"), effect.pfx_PlayTargetType);

            effect.pfx_Model               = StrParser.ParseStr(element.Attribute("Model"), effect.pfx_Model);
            effect.pfx_ModelBone           = StrParser.ParseStr(element.Attribute("ModelBone"), effect.pfx_ModelBone);
            effect.pfx_Bone                = StrParser.ParseStr(element.Attribute("Bone"), effect.pfx_Bone);
            effect.pfx_Offset              = vector3.LoadFromXml(element.Attribute("Offset"));
            effect.pfx_Rotate              = vector3.LoadFromXml(element.Attribute("Rotate"));
            effect.pfx_BoneFollow          = StrParser.ParseBool(element.Attribute("BoneFollow"), effect.pfx_BoneFollow);
            effect.pfx_Curve               = StrParser.ParseStr(element.Attribute("Curve"), effect.pfx_Curve);
            effect.pfx_Curve_Miss          = StrParser.ParseStr(element.Attribute("Curve_Miss"), effect.pfx_Curve_Miss);
            effect.pfx_CurveToTarget       = StrParser.ParseBool(element.Attribute("CurveToTarget"), effect.pfx_CurveToTarget);
            effect.pfx_CurveTargetBone     = StrParser.ParseStr(element.Attribute("CurveTargetBone"), effect.pfx_CurveTargetBone);
            effect.pfx_CurveTargetOffset   = vector3.LoadFromXml(element.Attribute("CurveTargetOffset"));
            effect.pfx_CurveSpeed          = StrParser.ParseFloat(element.Attribute("CurveSpeed"), 1f);
            effect.pfx_CurveTranslateSpeed = StrParser.ParseFloat(element.Attribute("CurveTranslateSpeed"), 1f);
            effect.pfx_DestroyType         = TypeNameContainer <AvatarAction.Effect._DestroyType> .Parse(element.Attribute("DestroyType"), effect.pfx_DestroyType);

            effect.sfx_Sound     = StrParser.ParseStr(element.Attribute("Sound"), effect.sfx_Sound);
            effect.sfx_Loop      = StrParser.ParseBool(element.Attribute("Loop"), effect.sfx_Loop);
            effect.sfx_Volume    = StrParser.ParseFloat(element.Attribute("Volume"), 0f);
            effect.cfx_Intensity = StrParser.ParseFloat(element.Attribute("Intensity"), 0f);
            effect.cfx_Duration  = StrParser.ParseFloat(element.Attribute("Duration"), 0f);
            effect.cfx_Interval  = StrParser.ParseFloat(element.Attribute("Interval"), 0f);
            effect.tfx_Scale     = StrParser.ParseFloat(element.Attribute("Scale"), 0f);
            effect.tfx_Duration  = StrParser.ParseFloat(element.Attribute("Duration"), 0f);
            return(effect);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        public static PropertyModifier LoadFromXml(SecurityElement element)
        {
            PropertyModifier modifier = new PropertyModifier();

            modifier._type = TypeNameContainer <_Type> .Parse(element.Attribute("Type"), modifier.type);

            modifier._modifyType = TypeNameContainer <_ValueModifyType> .Parse(element.Attribute("ModifyType"), modifier.modifyType);

            modifier._buffType = TypeNameContainer <ClientServerCommon.Buff._BuffType> .Parse(element.Attribute("BuffType"), 1);

            switch (modifier.type)
            {
            case 1:
                modifier._attributeType = TypeNameContainer <_AvatarAttributeType> .Parse(element.Attribute("AttributeType"), modifier.attributeType);

                modifier._attributeValue    = StrParser.ParseFloat(element.Attribute("Value"), 0f);
                modifier._attributeIncrease = StrParser.ParseFloat(element.Attribute("Increase"), 0f);
                return(modifier);

            case 2:
                modifier._color = ClientServerCommon.color.LoadFromXml(element.Attribute("Color"));
                return(modifier);

            case 3:
                modifier._abilityType = TypeNameContainer <_AvatarAbilityType> .Parse(element.Attribute("AbilityType"), modifier._abilityType);

                if (modifier._abilityType == 1)
                {
                    modifier._abilityValue = TypeNameContainer <ClientServerCommon.Buff._BuffType> .ParseBitList(element.Attribute("AbilityValue"), 0);
                }
                return(modifier);
            }
            modifier._attributeValue = StrParser.ParseFloat(element.Attribute("Value"), 0f);
            return(modifier);
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
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);
        }
Ejemplo n.º 8
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);
        }
Ejemplo n.º 9
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);
        }
Ejemplo n.º 10
0
 private VipLimitCount LoadVipLimitCountFromXml(SecurityElement element)
 {
     return(new VipLimitCount {
         type = TypeNameContainer <_VipLimitType> .Parse(element.Attribute("Type"), 0),
         count = StrParser.ParseDecInt(element.Attribute("Count"), 0)
     });
 }
Ejemplo n.º 11
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);
        }
Ejemplo n.º 12
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);
             }
         }
     }
 }
Ejemplo n.º 13
0
        private Good LoadGoodFromXml(SecurityElement element)
        {
            Good good = new Good {
                id          = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                goodsType   = TypeNameContainer <_Goods> .Parse(element.Attribute("GoodsType"), 0),
                assetIconId = StrParser.ParseHexInt(element.Attribute("AssetIconId"), 0),
                goodsIndex  = StrParser.ParseHexInt(element.Attribute("GoodsIndex"), 0),
                groupId     = StrParser.ParseHexInt(element.Attribute("GroupId"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Cost")
                        {
                            good.costs.Add(Cost.LoadFromXml(element2));
                        }
                        else if (tag == "Reward")
                        {
                            goto Label_00D7;
                        }
                    }
                    continue;
Label_00D7:
                    good.rewards.Add(Reward.LoadFromXml(element2));
                }
            }
            return(good);
        }
Ejemplo n.º 14
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));
                    }
                }
            }
        }
Ejemplo n.º 15
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);
        }
Ejemplo n.º 16
0
 private FunctionInfo LoadFunctionInfoFromXml(SecurityElement element)
 {
     return(new FunctionInfo {
         status = StrParser.ParseBool(element.Attribute("Status"), false),
         openFunction = TypeNameContainer <_OpenFunctionType> .Parse(element.Attribute("OpenFunction"), 0)
     });
 }
Ejemplo n.º 17
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)
     });
 }
Ejemplo n.º 18
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)
     });
 }
Ejemplo n.º 19
0
 public static GrowthAttribute LoadFromXml(SecurityElement element)
 {
     return(new GrowthAttribute {
         type = TypeNameContainer <_AvatarAttributeType> .Parse(element.Attribute("Type"), 0),
         baseValue = StrParser.ParseFloat(element.Attribute("Base"), 0f),
         deltaValue = StrParser.ParseFloat(element.Attribute("Delta"), 0f)
     });
 }
Ejemplo n.º 20
0
 private GlobalBuffSuperpositionType LoadGlobalBuffSuperpositionTypeFromXml(SecurityElement element)
 {
     return(new GlobalBuffSuperpositionType {
         buffType = TypeNameContainer <ClientServerCommon.Buff._BuffType> .Parse(element.Attribute("BuffType"), 0),
         superpositionType = TypeNameContainer <ClientServerCommon.Buff._SuperpositionType> .Parse(element.Attribute("SuperpositionType"), 1),
         conflictStrategy = TypeNameContainer <ClientServerCommon.Buff._ConflictStrategy> .Parse(element.Attribute("ConflictStrategy"), 1)
     });
 }
Ejemplo n.º 21
0
 public static SpecialSkill LoadFromXml(SecurityElement element)
 {
     return(new SpecialSkill {
         skillId = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         type = TypeNameContainer <SpecialSkillType> .Parse(element.Attribute("Type"), 0),
         rate = StrParser.ParseFloat(element.Attribute("Rate"), 0f)
     });
 }
Ejemplo n.º 22
0
        public AssembleSetting.Requirement LoadAssembleSettingRequirementFromXml(SecurityElement element)
        {
            AssembleSetting.Requirement requirement = new AssembleSetting.Requirement();
            requirement.Type = TypeNameContainer <AssembleSetting.Requirement._Type> .Parse(element.Attribute("Type"), requirement.Type);

            requirement.Value = StrParser.ParseHexInt(element.Attribute("Value"), requirement.Value);
            return(requirement);
        }
Ejemplo n.º 23
0
 public ValueFix LoadValueFixFromXml(SecurityElement element)
 {
     return(new ValueFix {
         Type = TypeNameContainer <_RankType> .Parse(element.Attribute("Type"), 0),
         SearchValue = StrParser.ParseDouble(element.Attribute("SearchValue"), 0.0),
         PassBossValue = StrParser.ParseDouble(element.Attribute("PassBossValue"), 0.0),
         ChallengeBossValue = StrParser.ParseDouble(element.Attribute("ChallengeBossValue"), 0.0)
     });
 }
Ejemplo n.º 24
0
 private DanHelpInfo LoadDanHelapFromXml(SecurityElement element)
 {
     return(new DanHelpInfo {
         InfoTpye = TypeNameContainer <_IntroduceType> .Parse(element.Attribute("InfoType"), 0),
         IconId = StrParser.ParseHexInt(element.Attribute("iconId"), 0),
         Name = StrParser.ParseStr(element.Attribute("Name"), ""),
         Desc = StrParser.ParseStr(element.Attribute("Desc"), "", true)
     });
 }
Ejemplo n.º 25
0
        private GuildPrivateGoods LoadGuildPrivateGoodsFromXml(SecurityElement element)
        {
            GuildPrivateGoods goods = new GuildPrivateGoods {
                GoodsId                = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                GoodsName              = StrParser.ParseStr(element.Attribute("Name"), ""),
                GoodsIconId            = StrParser.ParseHexInt(element.Attribute("IconId"), 0),
                GoodsDesc              = StrParser.ParseStr(element.Attribute("Desc"), ""),
                OpenTime               = StrParser.ParseDateTime(element.Attribute("StartTime")),
                CloseTime              = StrParser.ParseDateTime(element.Attribute("EndTime")),
                ResetType              = TypeNameContainer <_TimeDurationType> .Parse(element.Attribute("ResetType"), 0),
                BuyLimitCountPerCircle = StrParser.ParseDecInt(element.Attribute("BuyLimitCountPerCircle"), 0),
                BatchPurchase          = StrParser.ParseBool(element.Attribute("BatchPurchase"), false),
                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 == "CostInfo")
                        {
                            CostInfo item = new CostInfo {
                                BuyCount = StrParser.ParseDecInt(element2.Attribute("BuyCount"), 0)
                            };
                            if (element2.Children != null)
                            {
                                foreach (SecurityElement element3 in element2.Children)
                                {
                                    if (element3.Tag == "Cost")
                                    {
                                        item.Costs.Add(Cost.LoadFromXml(element3));
                                    }
                                }
                            }
                            goods.Costinfos.Add(item);
                        }
                        else if (tag == "Reward")
                        {
                            goods.Rewards.Add(Reward.LoadFromXml(element2));
                        }
                        else if (tag == "Limit")
                        {
                            LimitInfo info2 = new LimitInfo {
                                LimitType  = TypeNameContainer <_LimitType> .Parse(element2.Attribute("Type"), 0),
                                LimitValue = StrParser.ParseDecInt(element2.Attribute("Value"), 0)
                            };
                            goods.LimitInfos.Add(info2);
                        }
                    }
                }
            }
            return(goods);
        }
Ejemplo n.º 26
0
        private void LoadOpenLimitFromXml(SecurityElement element)
        {
            OpenLimit item = new OpenLimit {
                Type  = TypeNameContainer <_WolfSmokeOpenLimit> .Parse(element.Attribute("Type"), 0),
                Value = StrParser.ParseDecInt(element.Attribute("Value"), 0),
                Desc  = StrParser.ParseStr(element.Attribute("Desc"), "")
            };

            this._openLimits.Add(item);
        }
Ejemplo n.º 27
0
 private ClientServerCommon.SubType LoadSubTypeFromXml(SecurityElement element)
 {
     return(new ClientServerCommon.SubType {
         id = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         name = StrParser.ParseStr(element.Attribute("Name"), "", true),
         desc = StrParser.ParseStr(element.Attribute("Desc"), "", true),
         assetIconId = StrParser.ParseHexInt(element.Attribute("AssetIconId"), 0),
         assetIconType = TypeNameContainer <_WolfSmokeRenderIcon> .Parse(element.Attribute("AssetIconType"), 0)
     });
 }
Ejemplo n.º 28
0
 public static ClientServerCommon.Npc LoadNpcFromXml(SecurityElement element)
 {
     return(new ClientServerCommon.Npc {
         npcId = StrParser.ParseHexInt(element.Attribute("Id"), 0),
         npcType = TypeNameContainer <_NpcType> .Parse(element.Attribute("NpcType"), 1),
         scale = StrParser.ParseFloat(element.Attribute("Scale"), 1f),
         battlePosition = SceneConfig.ComposeBattlePosition(StrParser.ParseDecInt(element.Attribute("BattleRow"), 0), StrParser.ParseDecInt(element.Attribute("BattleColumn"), 0)),
         talentId = StrParser.ParseHexInt(element.Attribute("TalentId"), 0)
     });
 }
Ejemplo n.º 29
0
 private Notification LoadNotification(SecurityElement element)
 {
     return(new Notification {
         type = TypeNameContainer <_NotificationType> .Parse(StrParser.ParseStr(element.Attribute("Type"), ""), 0),
         messageBody = StrParser.ParseStr(element.Attribute("MessageBody"), ""),
         hasAction = StrParser.ParseBool(element.Attribute("HasAction"), false),
         actionTitle = StrParser.ParseStr(element.Attribute("ActionTitle"), ""),
         appIconBadageNumber = StrParser.ParseDecInt(element.Attribute("AppIconBadageNumber"), 0),
         isOpen = StrParser.ParseBool(element.Attribute("IsOpen"), false),
         delayTime = StrParser.ParseDecLong(element.Attribute("DelayTime"), 0L)
     });
 }
Ejemplo n.º 30
0
        private ClientServerCommon.Buff LoadBuffFromXml(SecurityElement element, int sourceTurnId)
        {
            ClientServerCommon.Buff buff = new ClientServerCommon.Buff {
                id                = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                buffType          = TypeNameContainer <ClientServerCommon.Buff._BuffType> .Parse(element.Attribute("BuffType"), 1),
                superpositionType = TypeNameContainer <ClientServerCommon.Buff._SuperpositionType> .Parse(element.Attribute("SuperpositionType"), 1),
                conflictStrategy  = TypeNameContainer <ClientServerCommon.Buff._ConflictStrategy> .Parse(element.Attribute("ConflictStrategy"), 1),
                uiName            = StrParser.ParseStr(element.Attribute("UIName"), "")
            };
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    AvatarAction.Effect effect;
                    AvatarAction        action;
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "ModifierSet")
                        {
                            if (tag == "Effect")
                            {
                                goto Label_00F1;
                            }
                            if (tag == "Action")
                            {
                                goto Label_010A;
                            }
                        }
                        else
                        {
                            buff.modifierSets.Add(PropertyModifierSet.LoadFromXml(element2));
                        }
                    }
                    continue;
Label_00F1:
                    effect = this.LoadEffectFromXml(element2);
                    if (effect != null)
                    {
                        buff.effects.Add(effect);
                    }
                    continue;
Label_010A:
                    action = this.LoadActionFromXml(element2, sourceTurnId);
                    if (action != null)
                    {
                        buff.actions.Add(action);
                    }
                }
            }
            return(buff);
        }