private void Awake()
 {
     s_instance = this;
     if (SceneMgr.Get() != null)
     {
         this.m_suppressed = SceneMgr.Get().IsModeRequested(SceneMgr.Mode.FATAL_ERROR);
     }
     NetCache.NetCacheProfileNotices netObject = NetCache.Get().GetNetObject <NetCache.NetCacheProfileNotices>();
     if (netObject != null)
     {
         this.MaybeShowSeasonEndDialog(netObject.Notices, false);
     }
     NetCache.Get().RegisterNewNoticesListener(new NetCache.DelNewNoticesListener(this.OnNewNotices));
 }
예제 #2
0
    private NetCache.ProfileNoticeDisconnectedGame GetDCGameNotice()
    {
        NetCache.NetCacheProfileNotices netObject = NetCache.Get().GetNetObject <NetCache.NetCacheProfileNotices>();
        if (((netObject == null) || (netObject.Notices == null)) || (netObject.Notices.Count == 0))
        {
            return(null);
        }
        NetCache.ProfileNoticeDisconnectedGame game = null;
        foreach (NetCache.ProfileNotice notice in netObject.Notices)
        {
            NetCache.ProfileNoticeDisconnectedGame game2 = notice as NetCache.ProfileNoticeDisconnectedGame;
            if (game2 != null)
            {
                if (game == null)
                {
                    game = game2;
                }
                else if (game2.NoticeID > game.NoticeID)
                {
                    game = game2;
                }
            }
        }
        List <NetCache.ProfileNoticeDisconnectedGame> list = new List <NetCache.ProfileNoticeDisconnectedGame>();

        foreach (NetCache.ProfileNotice notice2 in netObject.Notices)
        {
            NetCache.ProfileNoticeDisconnectedGame item = notice2 as NetCache.ProfileNoticeDisconnectedGame;
            if ((item != null) && (notice2.NoticeID != game.NoticeID))
            {
                list.Add(item);
            }
        }
        foreach (NetCache.ProfileNoticeDisconnectedGame game4 in list)
        {
            this.AckNotice(game4);
        }
        return(game);
    }