Esempio n. 1
0
 private FunctionInfo LoadFunctionInfoFromXml(SecurityElement element)
 {
     return(new FunctionInfo {
         status = StrParser.ParseBool(element.Attribute("Status"), false),
         openFunction = TypeNameContainer <_OpenFunctionType> .Parse(element.Attribute("OpenFunction"), 0)
     });
 }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 4
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);
        }
Esempio n. 5
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);
        }
Esempio n. 6
0
        public BaseInfo LoadBaseInfoFromXml(SecurityElement element)
        {
            BaseInfo info = new BaseInfo {
                SevenDayRefreshTime   = StrParser.ParseStr(element.Attribute("SevenDayRefreshTime"), string.Empty),
                ThreeDayRefreshTime   = StrParser.ParseStr(element.Attribute("ThreeDayRefreshTime"), string.Empty),
                DayRefreshTime        = StrParser.ParseDateTime(element.Attribute("DayRefreshTime")),
                DayReceivedBoxCount   = StrParser.ParseDecInt(element.Attribute("DayReceivedBoxCount"), 0),
                ExploreRankSize       = StrParser.ParseDecInt(element.Attribute("ExploreRankSize"), 0),
                BossHurtRankSize      = StrParser.ParseDecInt(element.Attribute("BossHurtRankSize"), 0),
                GuildProgressRankSize = StrParser.ParseDecInt(element.Attribute("GuildProgressRankSize"), 0),
                GuildSpeedRankSize    = StrParser.ParseDecInt(element.Attribute("GuildSpeedRankSize"), 0),
                //DayReceivedBoxCount = StrParser.ParseDecInt(element.Attribute("DayReceivedBoxCount"), 0),
                FreeChallengeCount          = StrParser.ParseDecInt(element.Attribute("FreeChallengeCount"), 0),
                ActivityId                  = StrParser.ParseHexInt(element.Attribute("ActivityId"), 0),
                MaxMsgCount                 = StrParser.ParseDecInt(element.Attribute("MaxMsgCount"), 0),
                StageResetCount             = StrParser.ParseDecInt(element.Attribute("StageResetCount"), 0),
                TalentResetCount            = StrParser.ParseDecInt(element.Attribute("TalentResetCount"), 0),
                ExploreCostId               = StrParser.ParseHexInt(element.Attribute("ExploreCostId"), 0),
                CompleteBoxIconId           = StrParser.ParseHexInt(element.Attribute("CompleteBoxIconId"), 0),
                UnSearchPassBossIconId      = StrParser.ParseHexInt(element.Attribute("UnSearchPassBossIconId"), 0),
                UnSearchChallengeBossIconId = StrParser.ParseHexInt(element.Attribute("UnSearchChallengeBossIconId"), 0),
                AdventureIconId             = StrParser.ParseHexInt(element.Attribute("AdventureIconId"), 0),
                GuildBuildIconId            = StrParser.ParseHexInt(element.Attribute("GuildBuildIconId"), 0),
                ShowBossCombatIconTime      = StrParser.ParseDecLong(element.Attribute("ShowBossCombatIconTime"), 0L),
                BoxSendOpen                 = StrParser.ParseBool(element.Attribute("BoxSendOpen"), false)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "BossItemChallenge")
                        {
                            if (tag == "RankValueFix")
                            {
                                goto Label_0274;
                            }
                            if (tag == "TalentMapNumRange")
                            {
                                goto Label_0288;
                            }
                        }
                        else
                        {
                            info.BossItemChallenges.Add(this.LoadBossItemChallenge(element2));
                        }
                    }
                    continue;
Label_0274:
                    info.RankValueFix.Add(this.LoadRankValueFix(element2));
                    continue;
Label_0288:
                    info.TalentMapNumRanges.Add(this.LoadValueRangeFromXml(element2));
                }
            }
            return(info);
        }
Esempio n. 7
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);
        }
Esempio n. 8
0
        private Item LoadItemFromXml(SecurityElement element)
        {
            Item item = new Item {
                id                      = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                hideInPackage           = StrParser.ParseBool(element.Attribute("HideInPackage"), false),
                maxUseCount             = StrParser.ParseDecInt(element.Attribute("MaxUseCount"), 0),
                playerLevel             = StrParser.ParseDecInt(element.Attribute("PlayerLevel"), 0),
                vipLevel                = StrParser.ParseDecInt(element.Attribute("VIPLevel"), 0),
                cannotUseTip            = StrParser.ParseStr(element.Attribute("CannotUseTip"), ""),
                sortIdx                 = StrParser.ParseDecInt(element.Attribute("SortIdx"), 0),
                firstOpenRewardGroupId  = StrParser.ParseHexInt(element.Attribute("FirstOpenRewardGroupId"), 0),
                normalOpenRewardGroupId = StrParser.ParseHexInt(element.Attribute("NormalOpenRewardGroupId"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "FixReward")
                        {
                            if (tag == "RandReward")
                            {
                                goto Label_0157;
                            }
                            if (tag == "ConsumeCost")
                            {
                                goto Label_016A;
                            }
                            if (tag == "Group")
                            {
                                goto Label_017D;
                            }
                        }
                        else
                        {
                            item.fixRewardPreviews.Add(Reward.LoadFromXml(element2));
                        }
                    }
                    continue;
Label_0157:
                    item.randRewardPreviews.Add(Reward.LoadFromXml(element2));
                    continue;
Label_016A:
                    item.consumeCost.Add(Cost.LoadFromXml(element2));
                    continue;
Label_017D:
                    item.consumeRewardGroup.Add(this.LoadGroupFromXml(element2, (item.consumeRewardGroup != null) ? item.consumeRewardGroup.Count : 0));
                }
            }
            return(item);
        }
 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)
     });
 }
Esempio n. 10
0
 private Challenge LoadChallengeFromXml(SecurityElement element)
 {
     if (element.Tag != "Challenge")
     {
         return(null);
     }
     return(new Challenge {
         Layers = StrParser.ParseDecInt(element.Attribute("Layers"), 0),
         IsConsequent = StrParser.ParseBool(element.Attribute("IsConsequent"), false),
         ConsequentLimit = StrParser.ParseDecInt(element.Attribute("ConsequentLimit"), 0),
         OpenByLayer = StrParser.ParseDecInt(element.Attribute("OpenByLayer"), 0),
         Point = StrParser.ParseDecInt(element.Attribute("Point"), 0)
     });
 }
Esempio n. 11
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);
        }
Esempio n. 12
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);
        }
Esempio n. 13
0
        public override void LoadFromXml(SecurityElement element)
        {
            if ((element.Tag == "WolfSmokeConfig") && (element.Children != null))
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    switch (element2.Tag)
                    {
                    case "WolfStageSet":
                        this.LoadWolfStagesFromXml(element2);
                        break;

                    case "WolfShop":
                        this.LoadWolfShopFromXml(element2);
                        break;

                    case "OpenLimit":
                        this.LoadOpenLimitFromXml(element2);
                        break;

                    case "ResetTime":
                        this._resetTime = StrParser.ParseDateTime(element2.Text);
                        break;

                    case "IsActivtyShopOpen":
                        this._isActivtyShopOpen = StrParser.ParseBool(element2.Text, false);
                        break;

                    case "AdditionSet":
                        this.LoadAdditionSetFromXml(element2);
                        break;

                    case "EggsEffectSet":
                        this.LoadEggsEffectSetFromXml(element2);
                        break;

                    case "MainTypeSet":
                        this.LoadMainTypeSetFromXml(element2);
                        break;
                    }
                }
            }
        }
Esempio n. 14
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"), "")
     });
 }
Esempio n. 15
0
        public static RewardSet LoadFromXml(SecurityElement element)
        {
            RewardSet set = new RewardSet {
                id      = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                dropAll = StrParser.ParseBool(element.Attribute("DropAll"), false)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "RewardGroup")
                    {
                        RewardGroup item = RewardGroup.LoadXml(element2);
                        set.rewardGroups.Add(item);
                    }
                }
            }
            return(set);
        }
Esempio n. 16
0
        public void LoadMysteryActivitysFromXml(SecurityElement element)
        {
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "MysteryActivity"))
                    {
                        MysteryActivity item = new MysteryActivity {
                            ActivityNum      = StrParser.ParseDecInt(element2.Attribute("ActivityNum"), 0),
                            FirstRefreshType = TypeNameContainer <_RefreshType> .Parse(element2.Attribute("FirstRefreshType"), 0),
                            IsDelItem        = StrParser.ParseBool(element2.Attribute("IsDelItem"), false),
                            ItemId           = StrParser.ParseHexInt(element2.Attribute("ItemId"), 0),
                            ShowCardId1      = StrParser.ParseHexInt(element2.Attribute("ShowCardId1"), 0),
                            ShowCardId2      = StrParser.ParseHexInt(element2.Attribute("ShowCardId2"), 0),
                            ShowCardId3      = StrParser.ParseHexInt(element2.Attribute("ShowCardId3"), 0)
                        };
                        foreach (SecurityElement element3 in element2.Children)
                        {
                            string tag = element3.Tag;
                            if (tag != null)
                            {
                                if (tag == "Refresh")
                                {
                                    item.Refreshs.Add(this.LoadRefreshFromXml(element3));
                                }
                                else if (tag == "TavernRewardInfo")
                                {
                                    goto Label_0147;
                                }
                            }
                            continue;
Label_0147:
                            item.TavernRewardInfos.Add(this.LoadTavernRewardInfoFromXml(element3));
                        }
                        this._mysteryActivitys.Add(item);
                    }
                }
            }
        }
Esempio n. 17
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);
        }
Esempio n. 18
0
        private void LoadQuestFromXml(SecurityElement element)
        {
            Quest item = new Quest {
                questId             = StrParser.ParseHexInt(element.Attribute("QuestId"), 0),
                type                = TypeNameContainer <_Type> .Parse(element.Attribute("Type"), 0),
                gotoUI              = TypeNameContainer <_UIType> .Parse(element.Attribute("GoToUI"), 0),
                resetType           = TypeNameContainer <_TimeDurationType> .Parse(element.Attribute("ResetType"), 0),
                eventType           = TypeNameContainer <_EventType> .Parse(element.Attribute("EventType"), 0),
                totalStepCount      = StrParser.ParseDecInt(element.Attribute("TotalStepCount"), 0),
                loopEvent           = StrParser.ParseBool(element.Attribute("LoopEvent"), false),
                index               = StrParser.ParseDecInt(element.Attribute("Index"), 0),
                showFx              = StrParser.ParseBool(element.Attribute("ShowFx"), false),
                notHideWhenFinished = StrParser.ParseBool(element.Attribute("NotHideWhenFinished"), false)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    Reward reward;
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Condition")
                        {
                            Condition condition = this.LoadConditionFromXml(element2);
                            item.conditions.Add(condition);
                        }
                        else if (tag == "Reward")
                        {
                            goto Label_0152;
                        }
                    }
                    continue;
Label_0152:
                    reward = Reward.LoadFromXml(element2);
                    item.rewards.Add(reward);
                }
            }
            this._quests.Add(item);
        }
Esempio n. 19
0
        private DialogueSet LoadDialogueSetFromXml(SecurityElement element)
        {
            DialogueSet set = new DialogueSet {
                dialogueSetId  = StrParser.ParseHexInt(element.Attribute("DialogueSetId"), 0),
                combatDialogue = StrParser.ParseBool(element.Attribute("CombatDialogue"), false)
            };

            if (element.Children != null)
            {
                for (int i = 0; i < element.Children.Count; i++)
                {
                    string          str;
                    SecurityElement element2 = element.Children[i] as SecurityElement;
                    if (((str = element2.Tag) != null) && (str == "Dialogues"))
                    {
                        set.dialogues.Add(this.LoadDialoguesFromXml(element2, i));
                    }
                }
            }
            return(set);
        }
Esempio n. 20
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);
        }
Esempio n. 21
0
        public static Breakthrough LoadFromXml(SecurityElement element)
        {
            Breakthrough breakthrough = new Breakthrough {
                fromTimes = StrParser.ParseDecInt(element.Attribute("FromTimes"), 0),
                sameCardDeductItemCount = StrParser.ParseDecInt(element.Attribute("SameCardDeductItemCount"), 0),
                itemCostItemId          = StrParser.ParseHexInt(element.Attribute("ItemCostItemId"), 0),
                itemCostItemCount       = StrParser.ParseDecInt(element.Attribute("ItemCostItemCount"), 0),
                powerUpLevelLimit       = StrParser.ParseDecInt(element.Attribute("PowerUpLevelLimit"), 0),
                isCostSameCardItem      = StrParser.ParseBool(element.Attribute("IsCostSameCardItem"), false)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Attribute")
                        {
                            GrowthAttribute item = GrowthAttribute.LoadFromXml(element2);
                            if (item.baseValue != 0f)
                            {
                                breakthrough.growthAttributes.Add(item);
                            }
                        }
                        else if (tag == "OtherCost")
                        {
                            goto Label_0100;
                        }
                    }
                    goto Label_0111;
Label_0100:
                    breakthrough.otherCosts.Add(Cost.LoadFromXml(element2));
Label_0111:
                    bool flag1 = element2.Tag != "Attribute";
                }
            }
            return(breakthrough);
        }
Esempio n. 22
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);
             }
         }
     }
 }
Esempio n. 23
0
        private RewardCounter LoadRewardCounterFromXml(SecurityElement element)
        {
            RewardCounter counter = new RewardCounter {
                NumberPositionType = TypeNameContainer <_NumberPositionType> .Parse(element.Attribute("NumberPositionType"), 0),
                FunctionOpen       = StrParser.ParseBool(element.Attribute("FunctionOpen"), false),
                CounterStartPoint  = StrParser.ParseDecInt(element.Attribute("CounterStartPoint"), 0),
                ActiveTimes        = StrParser.ParseDecInt(element.Attribute("ActiveTimes"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "NumberMapping"))
                    {
                        counter.NumberMappings.Add(this.LoadNumberMappingFromXml(element2));
                    }
                }
            }
            return(counter);
        }
Esempio n. 24
0
        public void LoadBasicSetFromXml(SecurityElement element)
        {
            this.freeRemedySignInTimes = StrParser.ParseDecInt(element.Attribute("FreeRemedySignInTimes"), 0);
            this.remedySignInCostDelta = StrParser.ParseDecInt(element.Attribute("RemedySignInCostDelta"), 0);
            this.remedySignStatus      = StrParser.ParseBool(element.Attribute("RemedySignStatus"), false);
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "DailyReward")
                        {
                            if (tag == "RemedyReward")
                            {
                                goto Label_00B0;
                            }
                            if (tag == "RemedySignInCost")
                            {
                                goto Label_00C3;
                            }
                        }
                        else
                        {
                            this._dailyRewards.AddRange(LoadRewardsFromXml(element2));
                        }
                    }
                    continue;
Label_00B0:
                    this._remedyRewards.AddRange(LoadRewardsFromXml(element2));
                    continue;
Label_00C3:
                    this._remedySignInCosts.AddRange(LoadCostsFromXml(element2));
                }
            }
        }
Esempio n. 25
0
        private AvatarAction LoadActionFromXml(SecurityElement element, int sourceTurnId)
        {
            AvatarAction action = new AvatarAction {
                sourceTurnId    = sourceTurnId,
                id              = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                actionType      = TypeNameContainer <AvatarAction._Type> .Parse(element.Attribute("ActionType"), 0),
                weaponType      = TypeNameContainer <EquipmentConfig._WeaponType> .Parse(element.Attribute("WeaponType"), 0),
                combatStateType = TypeNameContainer <_CombatStateType> .Parse(element.Attribute("CombatStateType"), 0),
                loop            = StrParser.ParseBool(element.Attribute("Loop"), false),
                //sourceTurnId = sourceTurnId
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Event")
                        {
                            action.events.Add(this.LoadEventFromXml(element2, action.events.Count, sourceTurnId));
                        }
                        else if (tag == "Animation")
                        {
                            goto Label_00F2;
                        }
                    }
                    continue;
Label_00F2:
                    action.animations.Add(this.LoadAnimationFromXml(element2));
                }
                action.animations.Sort((Comparison <AvatarAction.Animation>)((a1, a2) => (a2.type - a1.type)));
            }
            return(action);
        }
Esempio n. 26
0
        private Skill LoadSkillFromXml(SecurityElement element)
        {
            Skill skill = new Skill {
                id           = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                type         = TypeNameContainer <CombatTurn._Type> .Parse(element.Attribute("Type"), 0),
                sortIndex    = StrParser.ParseDecInt(element.Attribute("SortIndex"), 0),
                qualityLevel = StrParser.ParseDecInt(element.Attribute("QualityLevel"), 0)
            };

            skill.uiPfxName = StrParser.ParseStr(element.Attribute("UIPfxName"), skill.uiPfxName);
            skill.needSkillScrollToRobShow = StrParser.ParseBool(element.Attribute("NeedSkillScrollToRobShow"), false);
            skill.activeableAssembleDesc   = StrParser.ParseStr(element.Attribute("ActiveableAssembleDesc"), string.Empty);
            skill.isSuperSkill             = StrParser.ParseBool(element.Attribute("IsSuperSkill"), false);
            skill.roleVoiceName            = element.Attribute("RoleVoiceName");
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "LevelDesc")
                        {
                            if (tag == "LevelModiferSets")
                            {
                                goto Label_0163;
                            }
                            if (tag == "GetWay")
                            {
                                goto Label_0176;
                            }
                            if (tag == "SkillUnlockDesc")
                            {
                                goto Label_0189;
                            }
                            if (tag == "PowerAttribute")
                            {
                                goto Label_019D;
                            }
                        }
                        else
                        {
                            skill.levelDescs.Add(IncreaseString.LoadFromXml(element2));
                        }
                    }
                    continue;
Label_0163:
                    skill.levelModiferSets.Add(PropertyModifierSet.LoadFromXml(element2));
                    continue;
Label_0176:
                    skill.getways.Add(GetWay.LoadFromXml(element2));
                    continue;
Label_0189:
                    skill.skillUnlockDescs.Add(this.LoadSkillUnlockDescFromXml(element2));
                    continue;
Label_019D:
                    skill.powerAttributes = PowerAttribute.LoadFromXml(element2);
                }
            }
            return(skill);
        }
Esempio n. 27
0
        private AvatarBreakthrough LoadAvatarBreakThoughFromXml(SecurityElement element)
        {
            AvatarBreakthrough breakthrough = new AvatarBreakthrough {
                assetId      = StrParser.ParseHexInt(element.Attribute("AvatarAssetId"), 0),
                highAssetId  = StrParser.ParseHexInt(element.Attribute("HighAvatarAssetId"), 0),
                particleName = StrParser.ParseStr(element.Attribute("ParticleName"), string.Empty),
                canGetSellItemGeneralRewards = StrParser.ParseBool(element.Attribute("CanGetSellItemGeneralRewards"), false),
                leastSameCardCount           = StrParser.ParseDecInt(element.Attribute("LeastSameCardCount"), 0),
                compositeSkillLevel          = StrParser.ParseDecInt(element.Attribute("CompositeSkillLevel"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "Breakthrough")
                        {
                            if (tag == "SellReward")
                            {
                                goto Label_011D;
                            }
                            if (tag == "BaseAttributes")
                            {
                                goto Label_0133;
                            }
                            if (tag == "PowerAttribute")
                            {
                                goto Label_01C3;
                            }
                        }
                        else
                        {
                            breakthrough.breakThrough = Breakthrough.LoadFromXml(element2);
                        }
                    }
                    continue;
Label_011D:
                    breakthrough.sellRewards.Add(Reward.LoadFromXml(element2));
                    continue;
Label_0133:
                    if ((element2.Children != null) && (element2.Children.Count != 0))
                    {
                        foreach (SecurityElement element3 in element2.Children)
                        {
                            string str2;
                            if (((str2 = element3.Tag) != null) && (str2 == "Attribute"))
                            {
                                GrowthAttribute item = GrowthAttribute.LoadFromXml(element3);
                                if (item.baseValue != 0f)
                                {
                                    breakthrough.baseGrowthAttributes.Add(item);
                                }
                            }
                        }
                    }
                    continue;
Label_01C3:
                    breakthrough.powerAttributes = PowerAttribute.LoadFromXml(element2);
                }
            }
            return(breakthrough);
        }
Esempio n. 28
0
        private EquipBreakthrough LoadEquipmentBreakthroughFromXml(SecurityElement element)
        {
            EquipBreakthrough breakthrough = new EquipBreakthrough {
                canGetSellItemGeneralRewards = StrParser.ParseBool(element.Attribute("CanGetSellItemGeneralRewards"), false)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "UpgradeRequirementAddtionalCost")
                        {
                            if (tag == "Breakthrough")
                            {
                                goto Label_00B4;
                            }
                            if (tag == "SellReward")
                            {
                                goto Label_00C5;
                            }
                            if (tag == "BaseAttributes")
                            {
                                goto Label_00DB;
                            }
                            if (tag == "PowerAttribute")
                            {
                                goto Label_016B;
                            }
                        }
                        else
                        {
                            breakthrough.upgradeRequirementAddtionalCost = Cost.LoadFromXml(element2);
                        }
                    }
                    continue;
Label_00B4:
                    breakthrough.breakThrough = Breakthrough.LoadFromXml(element2);
                    continue;
Label_00C5:
                    breakthrough.sellRewards.Add(Reward.LoadFromXml(element2));
                    continue;
Label_00DB:
                    if ((element2.Children != null) && (element2.Children.Count != 0))
                    {
                        foreach (SecurityElement element3 in element2.Children)
                        {
                            string str2;
                            if (((str2 = element3.Tag) != null) && (str2 == "Attribute"))
                            {
                                GrowthAttribute item = GrowthAttribute.LoadFromXml(element3);
                                if (item.baseValue != 0f)
                                {
                                    breakthrough.baseGrowthAttributes.Add(item);
                                }
                            }
                        }
                    }
                    continue;
Label_016B:
                    breakthrough.powerAttributes = PowerAttribute.LoadFromXml(element2);
                }
            }
            return(breakthrough);
        }
Esempio n. 29
0
        public static TargetCondition LoadFromXml(SecurityElement element)
        {
            int num = TypeNameContainer <_Type> .Parse(element.Attribute("Type"), 0);

            if (num == 0)
            {
                return(null);
            }
            TargetCondition condition = new TargetCondition {
                type = num
            };

            switch (num)
            {
            case 1:
            case 2:
            case 3:
                condition.intValue = TypeNameContainer <_SubType> .Parse(element.Text, 0);

                return(condition);

            case 4:
            case 5:
            case 0x10:
            case 0x11:
                return(condition);

            case 6:
                condition.stringValue = StrParser.ParseStr(element.Text, condition.stringValue);
                condition.intValue    = TypeNameContainer <_ConditionValueCompareType> .Parse(element.Attribute("Compare"), condition.intValue);

                condition.doubleValue = StrParser.ParseDouble(element.Attribute("CompareValue"), condition.doubleValue);
                return(condition);

            case 7:
            case 8:
                condition.boolValue = StrParser.ParseBool(element.Attribute("SingleRowColumn"), false);
                condition.intValue  = TypeNameContainer <_SubType> .Parse(element.Text, 0);

                return(condition);

            case 9:
                condition.intValue = StrParser.ParseDecInt(element.Text, 0);
                return(condition);

            case 10:
                condition.intValue = TypeNameContainer <_SubType> .Parse(element.Text, 0);

                condition.intValue1 = TypeNameContainer <_AvatarAttributeType> .Parse(element.Attribute("AttributeType"), 0);

                condition.boolValue = StrParser.ParseBool(element.Attribute("AscendingSort"), true);
                return(condition);

            case 11:
                condition.intValue = TypeNameContainer <AvatarConfig._AvatarCountryType> .ParseBitList(element.Text, 0);

                return(condition);

            case 12:
            {
                string[] strArray = element.Text.Split(new char[] { ',' });
                condition.intValue  = StrParser.ParseDecInt(strArray[0], 1);
                condition.intValue1 = StrParser.ParseDecInt(strArray[1], 1);
                return(condition);
            }

            case 13:
                condition.intValue = TypeNameContainer <AvatarConfig._CharacterType> .Parse(element.Text, 0);

                return(condition);

            case 14:
                condition.intValue = StrParser.ParseHexInt(element.Text, 0);
                return(condition);

            case 15:
                condition.enumList.AddRange(TypeNameContainer <CombatTurn._Type> .ParseList(element.Text, 0));
                return(condition);

            case 0x12:
                condition.intValue = TypeNameContainer <ClientServerCommon.Buff._BuffType> .Parse(element.Attribute("BuffType"), 0);

                condition.intValue1 = StrParser.ParseHexInt(element.Attribute("BuffId"), 0);
                return(condition);

            case 0x13:
                condition.stringValue = StrParser.ParseStr(element.Text, condition.stringValue);
                condition.intValue    = TypeNameContainer <_ConditionValueCompareType> .Parse(element.Attribute("Compare"), 0);

                condition.doubleValue = StrParser.ParseDouble(element.Attribute("CompareValue"), 0.0);
                condition.intValue1   = TypeNameContainer <_ConditionValueCompareType> .Parse(element.Attribute("CountCompare"), 0);

                condition.doubleValue1 = StrParser.ParseDouble(element.Attribute("CountCompareValue"), 0.0);
                return(condition);

            case 20:
                condition.intValue = TypeNameContainer <_SubType> .Parse(element.Text, 0);

                return(condition);

            case 0x15:
                condition.stringValue = StrParser.ParseStr(element.Text, string.Empty);
                condition.intValue    = TypeNameContainer <_ConditionValueCompareType> .Parse(element.Attribute("Compare"), 0);

                condition.doubleValue = StrParser.ParseDouble(element.Attribute("CompareValue"), 0.0);
                return(condition);

            case 0x16:
                condition.enumList.AddRange(TypeNameContainer <_SubType> .ParseList(element.Text, 0));
                return(condition);

            case 0x17:
                condition.intValue = TypeNameContainer <_SubType> .Parse(element.Text, 0);

                return(condition);

            case 0x18:
                condition.intValue = TypeNameContainer <AvatarAction.Event._Type> .Parse(element.Text, 0);

                condition.intValue1 = TypeNameContainer <ClientServerCommon.Buff._BuffType> .Parse(element.Attribute("BuffType"), 0);

                return(condition);
            }
            return(condition);
        }
Esempio n. 30
0
        private Tavern LoadTavernFromXml(SecurityElement element)
        {
            Tavern tavern = new Tavern {
                Id                   = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                RecruitStage         = _TavernRecruitStage.ParseStage(element.Attribute("RecruitStage"), 0),
                RecruitDesc          = StrParser.ParseStr(element.Attribute("RecruitDesc"), ""),
                RewardDesc           = StrParser.ParseStr(element.Attribute("RewardDesc"), ""),
                Priority             = StrParser.ParseDecInt(element.Attribute("Priority"), 0),
                Level                = StrParser.ParseDecInt(element.Attribute("Level"), 0),
                VipLevel             = StrParser.ParseDecInt(element.Attribute("VipLevel"), 0),
                CoolDownTime         = StrParser.ParseDecInt(element.Attribute("CoolDownTime"), 0),
                QualityIconId        = StrParser.ParseHexInt(element.Attribute("QualityIconId"), 0),
                CountyIconId         = StrParser.ParseHexInt(element.Attribute("CountyIconId"), 0),
                BackGroundId         = StrParser.ParseHexInt(element.Attribute("BackGroundId"), 0),
                IsOpen               = StrParser.ParseBool(element.Attribute("IsOpen"), false),
                CanTenTavern         = StrParser.ParseBool(element.Attribute("CanTenTavern"), false),
                NormalFirstDesc      = StrParser.ParseStr(element.Attribute("NormalFirstDesc"), ""),
                TenTavernFristDesc   = StrParser.ParseStr(element.Attribute("TenTavernFristDesc"), ""),
                SepicalRewardContext = StrParser.ParseStr(element.Attribute("SepicalRewardContext"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    switch (element2.Tag)
                    {
                    case "Cost":
                        tavern.Cost = Cost.LoadFromXml(element2);
                        break;

                    case "TenTavernCost":
                        tavern.TenTavernCost = Cost.LoadFromXml(element2);
                        break;

                    case "TenTavernOriginalCost":
                        tavern.TenTavernOriginalCost = Cost.LoadFromXml(element2);
                        break;

                    case "Reward":
                        tavern.Reward = Reward.LoadFromXml(element2);
                        break;

                    case "Reward1":
                        tavern.Reward1 = Reward.LoadFromXml(element2);
                        break;

                    case "TenTavernReward":
                        tavern.TenTavernReward = Reward.LoadFromXml(element2);
                        break;

                    case "TenTavernReward1":
                        tavern.TenTavernReward1 = Reward.LoadFromXml(element2);
                        break;

                    case "ShowResourceId":
                        tavern.ShowResourceIds.Add(StrParser.ParseHexInt(element2.Attribute("Id"), 0));
                        break;

                    case "SepicalRewardId":
                        tavern.SepicalRewardId.Add(StrParser.ParseHexInt(element2.Attribute("Id"), 0));
                        break;
                    }
                }
            }
            return(tavern);
        }