private void HandleLogonCompleteRequest(RPCContext context) { LogonResult result = LogonResult.ParseFrom(context.Payload); BattleNetErrors errorCode = (BattleNetErrors)result.ErrorCode; if (errorCode != BattleNetErrors.ERROR_OK) { base.m_battleNet.EnqueueErrorInfo(BnetFeature.Auth, BnetFeatureEvent.Auth_OnFinish, errorCode, context.Context); } else { this.m_accountEntity = result.Account; base.m_battleNet.Presence.PresenceSubscribe(this.m_accountEntity); this.m_gameAccounts = new List <EntityId>(); foreach (EntityId id in result.GameAccountList) { this.m_gameAccounts.Add(id); base.m_battleNet.Presence.PresenceSubscribe(id); } if (this.m_gameAccounts.Count > 0) { this.m_gameAccount = result.GameAccountList[0]; } base.m_battleNet.IssueSelectGameAccountRequest(); base.m_battleNet.SetConnectedRegion(result.ConnectedRegion); object[] args = new object[] { result }; base.ApiLog.LogDebug("LogonComplete {0}", args); object[] objArray2 = new object[] { result.ConnectedRegion }; base.ApiLog.LogDebug("Region (connected): {0}", objArray2); BIReport.Get().Report_Telemetry(Telemetry.Level.LEVEL_INFO, BIReport.TelemetryEvent.EVENT_LOGIN_SUCCESS); } }
private void ResetImmediately(bool forceLogin, bool forceNoAccountTutorial = false) { Log.Reset.Print(string.Concat(new object[] { "ApplicationMgr.ResetImmediately - forceLogin? ", forceLogin, " Stack trace: ", Environment.StackTrace }), new object[0]); BIReport.Get().Report_Telemetry(Telemetry.Level.LEVEL_INFO, !forceLogin ? BIReport.TelemetryEvent.EVENT_ON_RESET : BIReport.TelemetryEvent.EVENT_ON_RESET_WITH_LOGIN); if (this.WillReset != null) { this.WillReset(); } this.m_resetting = true; this.m_lastResetTime = UnityEngine.Time.realtimeSinceStartup; if (DialogManager.Get() != null) { DialogManager.Get().Suppress(true); DialogManager.Get().Suppress(false); } if (Network.TUTORIALS_WITHOUT_ACCOUNT != null) { Network.SetShouldBeConnectedToAurora(forceLogin || Options.Get().GetBool(Option.CONNECT_TO_AURORA)); } FatalErrorMgr.Get().ClearAllErrors(); this.m_hasResetSinceLastResume = true; if (forceNoAccountTutorial) { Options.Get().SetBool(Option.CONNECT_TO_AURORA, false); Network.SetShouldBeConnectedToAurora(false); } if (this.Resetting != null) { this.Resetting(); } Network.Reset(); Navigation.Clear(); this.m_resetting = false; Log.Reset.Print("\tApplicationMgr.ResetImmediately completed", new object[0]); }
private void OnDestroy() { s_instance = null; }
private void Awake() { s_instance = this; this.GenerateSessionID(); }