예제 #1
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);
        }
 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)
     });
 }