Пример #1
0
 private void UpdateTourneyPage()
 {
     if (!NetCache.Get().GetNetObject <NetCache.NetCacheFeatures>().Games.Tournament)
     {
         if (!SceneMgr.Get().IsModeRequested(SceneMgr.Mode.HUB))
         {
             SceneMgr.Get().SetNextMode(SceneMgr.Mode.HUB);
             Error.AddWarningLoc("GLOBAL_FEATURE_DISABLED_TITLE", "GLOBAL_FEATURE_DISABLED_MESSAGE_PLAY", new object[0]);
         }
     }
     else
     {
         NetCache.NetCacheMedalInfo netObject = NetCache.Get().GetNetObject <NetCache.NetCacheMedalInfo>();
         bool flag = (this.m_currentMedalInfo != null) && ((netObject.StarLevel != this.m_currentMedalInfo.StarLevel) || (netObject.Stars != this.m_currentMedalInfo.Stars));
         this.m_currentMedalInfo = netObject;
         if (flag)
         {
             foreach (DelMedalChanged changed in this.m_medalChangedListeners.ToArray())
             {
                 changed(this.m_currentMedalInfo);
             }
         }
         this.m_netCacheReturned = true;
     }
 }
Пример #2
0
    private void OnError()
    {
        if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.DRAFT))
        {
            Network.DraftError draftError = Network.GetDraftError();
            DraftDisplay       display    = DraftDisplay.Get();
            switch (draftError)
            {
            case Network.DraftError.DE_UNKNOWN:
                Debug.LogError("DraftManager.OnError - UNKNOWN EXCEPTION - Talk to Brode or Fitch.");
                return;

            case Network.DraftError.DE_NO_LICENSE:
                Debug.LogWarning("DraftManager.OnError - No License.  What does this mean???");
                return;

            case Network.DraftError.DE_RETIRE_FIRST:
                Debug.LogError("DraftManager.OnError - You cannot start a new draft while one is in progress.");
                return;

            case Network.DraftError.DE_NOT_IN_DRAFT:
                if (display != null)
                {
                    display.SetDraftMode(DraftDisplay.DraftMode.NO_ACTIVE_DRAFT);
                }
                return;

            case Network.DraftError.DE_NOT_IN_DRAFT_BUT_COULD_BE:
                if (!Options.Get().GetBool(Option.HAS_SEEN_FORGE, false))
                {
                    DraftDisplay.Get().SetDraftMode(DraftDisplay.DraftMode.NO_ACTIVE_DRAFT);
                    return;
                }
                this.RequestDraftStart();
                return;

            case Network.DraftError.DE_FEATURE_DISABLED:
                Debug.LogError("DraftManager.OnError - The Arena is currently disabled. Returning to the hub.");
                if (!SceneMgr.Get().IsModeRequested(SceneMgr.Mode.HUB))
                {
                    SceneMgr.Get().SetNextMode(SceneMgr.Mode.HUB);
                    Error.AddWarningLoc("GLOBAL_FEATURE_DISABLED_TITLE", "GLOBAL_FEATURE_DISABLED_MESSAGE_FORGE", new object[0]);
                }
                return;
            }
            Debug.LogError("DraftManager.onError - UNHANDLED ERROR - please send this to Brode. ERROR: " + draftError.ToString());
        }
    }
Пример #3
0
 private void OnNetCacheReady()
 {
     NetCache.Get().UnregisterNetCacheHandler(new NetCache.NetCacheCallback(this.OnNetCacheReady));
     if (!NetCache.Get().GetNetObject <NetCache.NetCacheFeatures>().Games.Practice)
     {
         if (!SceneMgr.Get().IsModeRequested(SceneMgr.Mode.HUB))
         {
             SceneMgr.Get().SetNextMode(SceneMgr.Mode.HUB);
             Error.AddWarningLoc("GLOBAL_FEATURE_DISABLED_TITLE", "GLOBAL_FEATURE_DISABLED_MESSAGE_PRACTICE", new object[0]);
         }
     }
     else if (AchieveManager.Get().HasActiveQuests(true))
     {
         WelcomeQuests.Show(false, null, false);
     }
     else
     {
         GameToastMgr.Get().UpdateQuestProgressToasts();
     }
 }