Esempio n. 1
0
 private FriendListAvailabilityBlockerReasons GetAvailabilityBlockerReason()
 {
     if (!this.m_netCacheReady)
     {
         return(FriendListAvailabilityBlockerReasons.NETCACHE_NOT_READY);
     }
     if (!this.m_myPlayerReady)
     {
         return(FriendListAvailabilityBlockerReasons.MY_PLAYER_NOT_READY);
     }
     if (this.HasChallenge())
     {
         return(FriendListAvailabilityBlockerReasons.HAS_EXISTING_CHALLENGE);
     }
     if (SpectatorManager.Get().IsInSpectatorMode())
     {
         return(FriendListAvailabilityBlockerReasons.SPECTATING_GAME);
     }
     if (GameMgr.Get().IsFindingGame())
     {
         return(FriendListAvailabilityBlockerReasons.FINDING_GAME);
     }
     if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.FATAL_ERROR))
     {
         return(FriendListAvailabilityBlockerReasons.HAS_FATAL_ERROR);
     }
     if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.LOGIN))
     {
         return(FriendListAvailabilityBlockerReasons.LOGGING_IN);
     }
     if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.STARTUP))
     {
         return(FriendListAvailabilityBlockerReasons.STARTING_UP);
     }
     if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.GAMEPLAY))
     {
         if (GameMgr.Get().IsSpectator() || GameMgr.Get().IsNextSpectator())
         {
             return(FriendListAvailabilityBlockerReasons.SPECTATING_GAME);
         }
         if (!GameMgr.Get().IsAI() && !GameMgr.Get().IsNextAI())
         {
             return(FriendListAvailabilityBlockerReasons.PLAYING_NON_AI_GAME);
         }
         return(FriendListAvailabilityBlockerReasons.PLAYING_AI_GAME);
     }
     if (!GameUtils.AreAllTutorialsComplete())
     {
         return(FriendListAvailabilityBlockerReasons.TUTORIALS_INCOMPLETE);
     }
     if (ShownUIMgr.Get().GetShownUI() == ShownUIMgr.UI_WINDOW.GENERAL_STORE)
     {
         return(FriendListAvailabilityBlockerReasons.STORE_IS_SHOWN);
     }
     if ((TavernBrawlDisplay.Get() != null) && TavernBrawlDisplay.Get().IsInDeckEditMode())
     {
         return(FriendListAvailabilityBlockerReasons.EDITING_TAVERN_BRAWL);
     }
     return(FriendListAvailabilityBlockerReasons.NONE);
 }
 protected override void Hide(bool animate)
 {
     if (this.m_presencePrevStatus == null)
     {
         this.m_presencePrevStatus = new Enum[] { PresenceStatus.HUB };
     }
     PresenceMgr.Get().SetStatus(this.m_presencePrevStatus);
     if (ShownUIMgr.Get() != null)
     {
         ShownUIMgr.Get().ClearShownUI();
     }
     base.DoHideAnimation(!animate, delegate {
         AchieveManager.Get().RemoveQuestCanceledListener(new AchieveManager.AchieveCanceledCallback(this.OnQuestCanceled));
         this.DeleteQuests();
         FullScreenFXMgr.Get().EndStandardBlurVignette(0.1f, null);
         base.m_shown = false;
     });
 }