summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XLoginDocument.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XLoginDocument.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XLoginDocument.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/XLoginDocument.cs1440
1 files changed, 1440 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/XLoginDocument.cs b/Client/Assets/Scripts/XMainClient/XLoginDocument.cs
new file mode 100644
index 00000000..2d1a1b0c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/XLoginDocument.cs
@@ -0,0 +1,1440 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using KKSG;
+using MiniJSON;
+using UILib;
+using UnityEngine;
+using XMainClient.UI;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class XLoginDocument : XSingleton<XLoginDocument>
+ {
+ public XLoginView View
+ {
+ get
+ {
+ return this._view;
+ }
+ set
+ {
+ this._view = value;
+ }
+ }
+
+ public PlatNotice Announcement
+ {
+ get
+ {
+ return this._announcement;
+ }
+ }
+
+ public bool SDKSignOut
+ {
+ get
+ {
+ return this._sdk_sign_out;
+ }
+ set
+ {
+ this._sdk_sign_out = value;
+ }
+ }
+
+ private string _openid
+ {
+ get
+ {
+ return this.__openid;
+ }
+ set
+ {
+ this.__openid = value;
+ XFileLog.OpenID = value;
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SetApmUserID(value);
+ }
+ }
+
+ public uint LoginZoneID
+ {
+ get
+ {
+ return this._login_zoneid;
+ }
+ }
+
+ public bool freeflow
+ {
+ get
+ {
+ return this._freeflow;
+ }
+ }
+
+ public int cctype
+ {
+ get
+ {
+ return this._cctype;
+ }
+ }
+
+ private float FetchingElapsed
+ {
+ get
+ {
+ return Time.realtimeSinceStartup - this._last_fetch_at;
+ }
+ }
+
+ private float LoginingElapsed
+ {
+ get
+ {
+ return Time.realtimeSinceStartup - this._last_login_at;
+ }
+ }
+
+ public string Account
+ {
+ get
+ {
+ return this._account;
+ }
+ }
+
+ public string Password
+ {
+ get
+ {
+ return this._pwd;
+ }
+ }
+
+ public string OpenID
+ {
+ get
+ {
+ return this._openid;
+ }
+ }
+
+ public XAuthorizationChannel Channel
+ {
+ get
+ {
+ return this._channel;
+ }
+ }
+
+ public string TokenCache
+ {
+ get
+ {
+ return this._token_cache;
+ }
+ }
+
+ public bool FetchTokenDelay
+ {
+ get
+ {
+ return this._fetch_delay;
+ }
+ }
+
+ public bool LoginDelay
+ {
+ get
+ {
+ return this._login_delay;
+ }
+ }
+
+ public bool Authorized
+ {
+ get
+ {
+ return this._authorized;
+ }
+ }
+
+ public List<string> ZoneList
+ {
+ get
+ {
+ return this._zone_list;
+ }
+ }
+
+ public Dictionary<string, List<int>> ServerCategory
+ {
+ get
+ {
+ return this._server_category;
+ }
+ }
+
+ public uint RoleCountInQueue
+ {
+ get
+ {
+ return this._role_count_inqueue;
+ }
+ }
+
+ public uint LeftTimeInQueue
+ {
+ get
+ {
+ return this._left_time_inqueue;
+ }
+ }
+
+ public List<ServerInfo> BackFlowServerList
+ {
+ get
+ {
+ return this._backFlowServerList;
+ }
+ }
+
+ private static readonly byte _seed = 148;
+
+ private static readonly float _delay_notice_threshold = 0.5f;
+
+ private static readonly float _max_delay_notice_threshold = 10f;
+
+ private static readonly float _max_notice_threshold = 5f;
+
+ private XAuthorizationChannel _channel = XAuthorizationChannel.XAuthorization_Max;
+
+ private XLoginView _view = null;
+
+ private PlatNotice _announcement = null;
+
+ private bool _sdk_sign_out = false;
+
+ private bool _after_login_announcement = false;
+
+ private bool _notification = false;
+
+ private bool _authorized = false;
+
+ private bool _auto_authorization = false;
+
+ private string _account = null;
+
+ private string _pwd = null;
+
+ private string __openid = null;
+
+ private uint _login_zoneid = 0u;
+
+ private bool _freeflow;
+
+ private int _cctype;
+
+ private string _token_cache = null;
+
+ private bool _fetch_delay = false;
+
+ private bool _fetching_token = false;
+
+ private float _last_fetch_at = 0f;
+
+ private bool _authorized_from_login_stage = false;
+
+ private bool _login_delay = false;
+
+ private bool _logining = false;
+
+ private float _last_login_at = 0f;
+
+ private bool _in_server_queue = false;
+
+ private float enterWorldTime = 0f;
+
+ private List<string> _zone_list = new List<string>();
+
+ private Dictionary<string, List<int>> _server_category = new Dictionary<string, List<int>>();
+
+ private Dictionary<int, ServerInfo> _server_dic = new Dictionary<int, ServerInfo>();
+
+ private List<ServerInfo> _backFlowServerList = new List<ServerInfo>();
+
+ public Dictionary<string, FriendServerInfo> FriendServerDic = new Dictionary<string, FriendServerInfo>();
+
+ public List<string> FriendOpenid = new List<string>();
+
+ private uint _role_count_inqueue = 0u;
+
+ private uint _left_time_inqueue = 0u;
+
+ private LoginReconnectInfo _login_reconnect_info = null;
+
+ private uint _query_queue_token = 0u;
+
+ private float[] lastLoginTime = new float[2];
+
+ private StartUpType _LaunchTypeServer = StartUpType.StartUp_Normal;
+
+ private void ResetAccoutInfo()
+ {
+ this._sdk_sign_out = false;
+ this._account = null;
+ this._pwd = null;
+ this._openid = null;
+ this._token_cache = null;
+ }
+
+ public void SetChannelByWakeUp()
+ {
+ switch (this.GetWakeUpType())
+ {
+ case StartUpType.StartUp_QQ:
+ this._channel = XAuthorizationChannel.XAuthorization_QQ;
+ break;
+ case StartUpType.StartUp_WX:
+ this._channel = XAuthorizationChannel.XAuthorization_WeChat;
+ break;
+ }
+ }
+
+ private void SetChannelByLaunchType()
+ {
+ switch (this.GetLaunchType())
+ {
+ case StartUpType.StartUp_QQ:
+ this._channel = XAuthorizationChannel.XAuthorization_QQ;
+ break;
+ case StartUpType.StartUp_WX:
+ this._channel = XAuthorizationChannel.XAuthorization_WeChat;
+ break;
+ }
+ }
+
+ public void LoadAccount()
+ {
+ string path = Application.persistentDataPath + "/account.txt";
+ bool flag = (int)Application.platform == 7 || (int)Application.platform == 0 || (int)Application.platform == 2;
+ if (flag)
+ {
+ path = Application.dataPath + "/account.txt";
+ }
+ bool flag2 = !File.Exists(path);
+ if (flag2)
+ {
+ this.SetChannelByLaunchType();
+ }
+ else
+ {
+ string text = this.XCryptography(File.ReadAllBytes(path));
+ string[] array = text.Split(null);
+ int num = 0;
+ bool flag3 = int.TryParse(array[0], out num) && num > 0 && num < XFastEnumIntEqualityComparer<XAuthorizationChannel>.ToInt(XAuthorizationChannel.XAuthorization_Max);
+ if (flag3)
+ {
+ this._channel = (XAuthorizationChannel)num;
+ this.SetChannelByLaunchType();
+ switch (this._channel)
+ {
+ case XAuthorizationChannel.XAuthorization_Internal:
+ {
+ bool flag4 = array.Length == 3;
+ if (flag4)
+ {
+ this._account = array[1];
+ this._pwd = array[2];
+ }
+ break;
+ }
+ }
+ }
+ else
+ {
+ this.SetChannelByLaunchType();
+ }
+ }
+ }
+
+ public void DelAccount()
+ {
+ string path = Application.persistentDataPath + "/account.txt";
+ bool flag =(int) Application.platform == 7 || (int)Application.platform == 0 || (int)Application.platform == 2;
+ if (flag)
+ {
+ path = Application.dataPath + "/account.txt";
+ }
+ try
+ {
+ bool flag2 = !File.Exists(path);
+ if (!flag2)
+ {
+ File.Delete(path);
+ }
+ }
+ catch (Exception ex)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Delete account file failed " + ex.Message, null, null, null, null, null);
+ }
+ }
+
+ public void AutoAuthorization(bool fromLoginStage)
+ {
+ this.Authorization(this._channel, fromLoginStage, true, this._account, this._pwd);
+ }
+
+ public bool CheckLoginBlockTime()
+ {
+ return Time.time - this.lastLoginTime[1] > XSingleton<XGlobalConfig>.singleton.LoginBlockTime;
+ }
+
+ public void Authorization(XAuthorizationChannel channel, bool fromLoginStage, bool auto = false, string account = null, string pwd = null)
+ {
+ this.lastLoginTime[1] = this.lastLoginTime[0];
+ this.lastLoginTime[0] = Time.time;
+ this.SetBlockUIVisable(true);
+ this._authorized = false;
+ this._auto_authorization = auto;
+ this._authorized_from_login_stage = fromLoginStage;
+ this._fetching_token = true;
+ this._last_fetch_at = Time.realtimeSinceStartup;
+ switch (channel)
+ {
+ case XAuthorizationChannel.XAuthorization_Internal:
+ this._channel = channel;
+ this.InternalAuthorization(account, pwd);
+ break;
+ case XAuthorizationChannel.XAuthorization_SD:
+ this._channel = channel;
+ this.PlatformAuthorization();
+ break;
+ case XAuthorizationChannel.XAuthorization_QQ:
+ this._channel = channel;
+ this.QQAuthorization(auto);
+ break;
+ case XAuthorizationChannel.XAuthorization_WeChat:
+ this._channel = channel;
+ this.WeChatAuthorization(auto);
+ break;
+ case XAuthorizationChannel.XAuthorization_Guest:
+ this._channel = channel;
+ this.GuestAuthorization(auto);
+ break;
+ default:
+ this._fetching_token = false;
+ break;
+ }
+ }
+
+ public void ShowAfterLoginAnnouncement()
+ {
+ bool flag = !this._after_login_announcement;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowAfterLoginAnnouncement(this._announcement);
+ this._after_login_announcement = true;
+ }
+ }
+
+ public void OnError(string notify)
+ {
+ XSingleton<XPandoraSDKDocument>.singleton.PandoraLogout();
+ this._fetching_token = false;
+ this._authorized = false;
+ this._logining = false;
+ this._in_server_queue = false;
+ bool flag = this._channel != XAuthorizationChannel.XAuthorization_Internal && this._channel != XAuthorizationChannel.XAuthorization_Max;
+ if (flag)
+ {
+ this.ResetAccoutInfo();
+ }
+ bool flag2 = !string.IsNullOrEmpty(notify);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), notify));
+ }
+ this.FromBegining();
+ }
+
+ public void OnError()
+ {
+ this._fetching_token = false;
+ this._authorized = false;
+ this._logining = false;
+ this._in_server_queue = false;
+ }
+
+ public void FromBegining()
+ {
+ XSingleton<XClientNetwork>.singleton.ClearServerInfo();
+ this.SetBlockUIVisable(false);
+ bool authorized_from_login_stage = this._authorized_from_login_stage;
+ if (authorized_from_login_stage)
+ {
+ XSingleton<XLoginDocument>.singleton.ShowLoginUI();
+ }
+ else
+ {
+ this.BackToBegin();
+ }
+ this._after_login_announcement = false;
+ this._authorized_from_login_stage = false;
+ }
+
+ public void FromLogining()
+ {
+ this.SetBlockUIVisable(false);
+ bool authorized_from_login_stage = this._authorized_from_login_stage;
+ if (authorized_from_login_stage)
+ {
+ XSingleton<XLoginDocument>.singleton.ShowLoginSelectServerUI();
+ }
+ else
+ {
+ this.BackToLogin();
+ }
+ this._authorized_from_login_stage = false;
+ }
+
+ public void RefreshAccessToken(string token)
+ {
+ this._token_cache = token;
+ XSingleton<XDebug>.singleton.AddLog("AccessToken : ", this._token_cache, null, null, null, null, XDebugColor.XDebug_None);
+ }
+
+ public void OnAuthorization(string account, string pwd, string openid, XAuthorizationChannel channel)
+ {
+ this._fetching_token = false;
+ this._account = account;
+ this._pwd = pwd;
+ this._openid = openid;
+ this._channel = channel;
+ this._token_cache = account;
+ bool flag = string.IsNullOrEmpty(account) || string.IsNullOrEmpty(openid);
+ if (flag)
+ {
+ this.OnAuthorizedFailed();
+ }
+ else
+ {
+ switch (channel)
+ {
+ case XAuthorizationChannel.XAuthorization_Internal:
+ XSingleton<XClientNetwork>.singleton.Authorization(LoginType.LOGIN_PASSWORD, account, pwd, openid);
+ break;
+ case XAuthorizationChannel.XAuthorization_SD:
+ XSingleton<XClientNetwork>.singleton.Authorization(LoginType.LOGIN_SNDA_PF, account, pwd, openid);
+ break;
+ case XAuthorizationChannel.XAuthorization_QQ:
+ XSingleton<XClientNetwork>.singleton.Authorization(LoginType.LOGIN_QQ_PF, account, pwd, openid);
+ break;
+ case XAuthorizationChannel.XAuthorization_WeChat:
+ XSingleton<XClientNetwork>.singleton.Authorization(LoginType.LGOIN_WECHAT_PF, account, pwd, openid);
+ break;
+ case XAuthorizationChannel.XAuthorization_Guest:
+ XSingleton<XClientNetwork>.singleton.Authorization(LoginType.LOGIN_IOS_GUEST, account, pwd, openid);
+ break;
+ }
+ }
+ }
+
+ public void OnAuthorizationSignOut(string msg)
+ {
+ bool flag = this._channel == XAuthorizationChannel.XAuthorization_Max;
+ if (!flag)
+ {
+ this._sdk_sign_out = true;
+ bool flag2 = !XStage.IsConcreteStage(XSingleton<XGame>.singleton.CurrentStage.Stage);
+ if (flag2)
+ {
+ bool flag3 = string.IsNullOrEmpty(msg);
+ if (flag3)
+ {
+ this._authorized = false;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), msg));
+ }
+ this.FromBegining();
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("OnAuthorizationSignOut " + msg, null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XClientNetwork>.singleton.Close(NetErrCode.Net_NoError);
+ bool sceneReady = XSingleton<XScene>.singleton.SceneReady;
+ if (sceneReady)
+ {
+ XSingleton<UiUtility>.singleton.OnFatalErrorClosed(ErrorCode.ERR_AUTH_TOKEN_INVALID);
+ }
+ else
+ {
+ XSingleton<XScene>.singleton.Error = ErrorCode.ERR_AUTH_TOKEN_INVALID;
+ }
+ }
+ this._channel = XAuthorizationChannel.XAuthorization_Max;
+ }
+ }
+
+ public void AuthorizationSignOut()
+ {
+ bool flag = this._channel == XAuthorizationChannel.XAuthorization_Max;
+ if (!flag)
+ {
+ this._authorized = false;
+ bool flag2 = this._channel != XAuthorizationChannel.XAuthorization_Internal && this._channel != XAuthorizationChannel.XAuthorization_Max;
+ if (flag2)
+ {
+ this.ResetAccoutInfo();
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.LogOut();
+ }
+ this.DelAccount();
+ XSingleton<XPandoraSDKDocument>.singleton.PandoraLogout();
+ this._channel = XAuthorizationChannel.XAuthorization_Max;
+ this.FromBegining();
+ }
+ }
+
+ public void OnAuthorized(string identification)
+ {
+ bool flag = this._channel == XAuthorizationChannel.XAuthorization_SD;
+ if (flag)
+ {
+ this._account = string.Format("{0} ({1})", identification, XStringDefineProxy.GetString("SDO_TOKEN"));
+ }
+ bool flag2 = this._channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag2)
+ {
+ this._account = identification + " (QQ)";
+ }
+ bool flag3 = this._channel == XAuthorizationChannel.XAuthorization_WeChat;
+ if (flag3)
+ {
+ this._account = string.Format("{0} ({1})", identification, XStringDefineProxy.GetString("WECHAT_TOKEN"));
+ }
+ bool flag4 = this._channel == XAuthorizationChannel.XAuthorization_Guest;
+ if (flag4)
+ {
+ this._account = string.Format("{0} ({1})", identification, XStringDefineProxy.GetString("GUEST_TOKEN"));
+ }
+ bool flag5 = !this._auto_authorization || this._authorized_from_login_stage;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), XStringDefineProxy.GetString("AUTHORIZED_SUCCESS")));
+ }
+ this.SaveAccount();
+ this._authorized = true;
+ this.ShowLoginSelectServerUI();
+ this.SetBlockUIVisable(false);
+ XSingleton<XClientNetwork>.singleton.XLoginStep = XLoginStep.Login;
+ }
+
+ public void OnAuthorizedFailed()
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), XStringDefineProxy.GetString("AUTHORIZED_FAIL")));
+ string sdkconfig = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.GetSDKConfig("get_login_eflag", "");
+ bool flag = this._channel != XAuthorizationChannel.XAuthorization_Internal && this._channel != XAuthorizationChannel.XAuthorization_Max;
+ if (flag)
+ {
+ this.ResetAccoutInfo();
+ }
+ XSingleton<PDatabase>.singleton.playerInfo = null;
+ XSingleton<PDatabase>.singleton.friendsInfo = null;
+ this._authorized = false;
+ this.OnError();
+ this.FromBegining();
+ }
+
+ public void OnAuthorizedConnectFailed()
+ {
+ bool flag = this._channel != XAuthorizationChannel.XAuthorization_Internal && this._channel != XAuthorizationChannel.XAuthorization_Max;
+ if (flag)
+ {
+ this.ResetAccoutInfo();
+ }
+ XSingleton<PDatabase>.singleton.playerInfo = null;
+ XSingleton<PDatabase>.singleton.friendsInfo = null;
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), XStringDefineProxy.GetString("AUTHORIZED_CONNECT_FAIL")));
+ this._authorized = false;
+ this.OnError();
+ this.FromBegining();
+ }
+
+ public void OnAuthorizedTimeOut()
+ {
+ bool flag = this._channel != XAuthorizationChannel.XAuthorization_Internal && this._channel != XAuthorizationChannel.XAuthorization_Max;
+ if (flag)
+ {
+ this.ResetAccoutInfo();
+ }
+ XSingleton<PDatabase>.singleton.playerInfo = null;
+ XSingleton<PDatabase>.singleton.friendsInfo = null;
+ XSingleton<UiUtility>.singleton.ShowLoginTip(this.PlatformComment(this._channel) + " 授权验证超时");
+ this._authorized = false;
+ this.FromBegining();
+ }
+
+ public void Login()
+ {
+ this.SetBlockUIVisable(true);
+ this._logining = true;
+ this._last_login_at = Time.realtimeSinceStartup;
+ this._in_server_queue = false;
+ XSingleton<XClientNetwork>.singleton.Login();
+ }
+
+ public void OnLogin()
+ {
+ bool authorized_from_login_stage = this._authorized_from_login_stage;
+ if (authorized_from_login_stage)
+ {
+ this._view.TweenAlpha(true);
+ }
+ XSingleton<XClientNetwork>.singleton.OnLogin();
+ this._logining = false;
+ this._authorized_from_login_stage = false;
+ this._in_server_queue = false;
+ this.SetBlockUIVisable(false);
+ }
+
+ public StartUpType GetWakeUpType()
+ {
+ StartUpType startUpType = StartUpType.StartUp_Normal;
+ string sdkconfig = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.GetSDKConfig("get_wakeup_info", "");
+ XSingleton<XDebug>.singleton.AddLog("[GetLaunchType] wakeupInfo:" + sdkconfig, null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag = sdkconfig == "";
+ StartUpType result;
+ if (flag)
+ {
+ result = startUpType;
+ }
+ else
+ {
+ Dictionary<string, object> dictionary = Json.Deserialize(sdkconfig) as Dictionary<string, object>;
+ object obj = null;
+ bool flag2 = dictionary != null && dictionary.TryGetValue("wakeup_platform", out obj);
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[GetLaunchType] platform: " + obj.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag3 = (long)obj == 1L;
+ if (flag3)
+ {
+ startUpType = StartUpType.StartUp_WX;
+ }
+ else
+ {
+ bool flag4 = (long)obj == 2L;
+ if (flag4)
+ {
+ startUpType = StartUpType.StartUp_QQ;
+ }
+ }
+ }
+ result = startUpType;
+ }
+ return result;
+ }
+
+ public StartUpType GetLaunchType()
+ {
+ StartUpType startUpType = StartUpType.StartUp_Normal;
+ string sdkconfig = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.GetSDKConfig("get_wakeup_info", "");
+ XSingleton<XDebug>.singleton.AddLog("[GetLaunchType] wakeupInfo:" + sdkconfig, null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag = sdkconfig == "";
+ StartUpType result;
+ if (flag)
+ {
+ result = startUpType;
+ }
+ else
+ {
+ Dictionary<string, object> dictionary = Json.Deserialize(sdkconfig) as Dictionary<string, object>;
+ object obj = null;
+ bool flag2 = dictionary != null && dictionary.TryGetValue("wakeup_platform", out obj);
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[GetLaunchType] platform: " + obj.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag3 = (long)obj == 1L;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[GetLaunchType] platform == 1", null, null, null, null, null, XDebugColor.XDebug_None);
+ object obj2 = null;
+ bool flag4 = dictionary.TryGetValue("wakeup_wx_extInfo", out obj2);
+ if (flag4)
+ {
+ bool flag5 = obj2.ToString() == "WX_GameCenter";
+ if (flag5)
+ {
+ startUpType = StartUpType.StartUp_WX;
+ XSingleton<XDebug>.singleton.AddLog("[GetLaunchType] StartUpType.StartUp_WX", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ }
+ }
+ else
+ {
+ bool flag6 = (long)obj == 2L;
+ if (flag6)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[GetLaunchType] platform == 2", null, null, null, null, null, XDebugColor.XDebug_None);
+ object obj3 = null;
+ bool flag7 = dictionary.TryGetValue("wakeup_qq_extInfo", out obj3);
+ if (flag7)
+ {
+ bool flag8 = obj3.ToString() == "sq_gamecenter";
+ if (flag8)
+ {
+ startUpType = StartUpType.StartUp_QQ;
+ XSingleton<XDebug>.singleton.AddLog("[GetLaunchType] StartUpType.StartUp_QQ", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ }
+ }
+ }
+ }
+ result = startUpType;
+ }
+ return result;
+ }
+
+ public void SetLaunchTypeServerInfo(StartUpType type)
+ {
+ this._LaunchTypeServer = type;
+ }
+
+ public StartUpType GetLaunchTypeServerInfo()
+ {
+ return this._LaunchTypeServer;
+ }
+
+ public void EnterToSelectChar()
+ {
+ XSingleton<XLoginDocument>.singleton.OnLogin();
+ EXStage stage = XSingleton<XGame>.singleton.CurrentStage.Stage;
+ if (stage != EXStage.Login)
+ {
+ if (stage == EXStage.SelectChar)
+ {
+ XSelectcharStage xselectcharStage = XSingleton<XGame>.singleton.CurrentStage as XSelectcharStage;
+ xselectcharStage.ReLogined();
+ }
+ }
+ else
+ {
+ XSingleton<XGame>.singleton.CurrentStage.Play();
+ }
+ }
+
+ public void CheckQueueState(object o)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._query_queue_token);
+ this._query_queue_token = 0u;
+ bool flag = !DlgBase<XLoginView, LoginWindowBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = !this._in_server_queue;
+ if (!flag2)
+ {
+ PtcC2M_CheckQueuingReq ptcC2M_CheckQueuingReq = new PtcC2M_CheckQueuingReq();
+ ptcC2M_CheckQueuingReq.Data.iscancel = false;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2M_CheckQueuingReq);
+ this._query_queue_token = XSingleton<XTimerMgr>.singleton.SetTimer(5f, new XTimerMgr.ElapsedEventHandler(this.CheckQueueState), null);
+ }
+ }
+ }
+
+ public void CancelQueue()
+ {
+ PtcC2M_CheckQueuingReq ptcC2M_CheckQueuingReq = new PtcC2M_CheckQueuingReq();
+ ptcC2M_CheckQueuingReq.Data.iscancel = true;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2M_CheckQueuingReq);
+ this.OnCancelServerQueue();
+ }
+
+ public void ShowServerQueue()
+ {
+ bool flag = !DlgBase<XLoginView, LoginWindowBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ this._in_server_queue = true;
+ DlgBase<XLoginView, LoginWindowBehaviour>.singleton.ShowQueue();
+ this.CheckQueueState(null);
+ this.SetBlockUIVisable(false);
+ }
+ }
+
+ public void WaitForServerQueue(uint roleCount, uint leftTime)
+ {
+ this._role_count_inqueue = roleCount;
+ this._left_time_inqueue = leftTime;
+ bool flag = !DlgBase<XLoginView, LoginWindowBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ DlgBase<XLoginView, LoginWindowBehaviour>.singleton.RefreshQueueState();
+ }
+ }
+
+ public void OnLoginFailed(string error)
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), string.IsNullOrEmpty(error) ? XStringDefineProxy.GetString("LOGIN_FAIL") : error));
+ this._logining = false;
+ this._in_server_queue = false;
+ this.FromLogining();
+ }
+
+ public void OnLoginTimeout()
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), XStringDefineProxy.GetString("LOGIN_TIMEOUT")));
+ this._logining = false;
+ this._in_server_queue = false;
+ this.FromLogining();
+ }
+
+ public void OnLoginConnectFailed()
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), XStringDefineProxy.GetString("LOGIN_CONNECT_FAIL")));
+ this._logining = false;
+ this._in_server_queue = false;
+ this.FromLogining();
+ }
+
+ public void OnCancelServerQueue()
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(XStringDefineProxy.GetString("CANCEL_QUEUE"));
+ this._logining = false;
+ this._in_server_queue = false;
+ XSingleton<XClientNetwork>.singleton.Close(NetErrCode.Net_NoError);
+ this._authorized_from_login_stage = true;
+ this.FromLogining();
+ }
+
+ public void EnterWorld(int index)
+ {
+ bool flag = Time.time - this.enterWorldTime < 2f;
+ if (!flag)
+ {
+ this.enterWorldTime = Time.time;
+ bool flag2 = index > 0;
+ if (flag2)
+ {
+ RpcC2M_SelectRoleNew rpcC2M_SelectRoleNew = new RpcC2M_SelectRoleNew();
+ rpcC2M_SelectRoleNew.oArg.index = index - 1;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2M_SelectRoleNew);
+ }
+ XSingleton<XClientNetwork>.singleton.XLoginToken = null;
+ }
+ }
+
+ public void CreateChar(string name, RoleType type)
+ {
+ bool flag = Time.time - this.enterWorldTime < 2f;
+ if (!flag)
+ {
+ this.enterWorldTime = Time.time;
+ RpcC2M_CreateRoleNew rpcC2M_CreateRoleNew = new RpcC2M_CreateRoleNew();
+ rpcC2M_CreateRoleNew.oArg.name = name;
+ rpcC2M_CreateRoleNew.oArg.type = type;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2M_CreateRoleNew);
+ this.SetBlockUIVisable(true);
+ }
+ }
+
+ public void OnEnterWorldFailed(string error)
+ {
+ this.BackToLogin();
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), string.IsNullOrEmpty(error) ? XStringDefineProxy.GetString("ENTER_WORLD_FAIL") : error));
+ }
+
+ public void OnEnterWorldTimeOut()
+ {
+ this.BackToLogin();
+ XSingleton<UiUtility>.singleton.ShowLoginTip(string.Format("{0} {1}", this.PlatformComment(this._channel), XStringDefineProxy.GetString("ENTER_WORLD_TIMEOUT")));
+ }
+
+ public void EnableSDONotify()
+ {
+ bool flag = !this._notification;
+ if (flag)
+ {
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.ResgiterSDONotification(XSingleton<XClientNetwork>.singleton.ServerID, XSingleton<XEntityMgr>.singleton.Player.Name);
+ }
+ this._notification = true;
+ }
+
+ private void BackToBegin()
+ {
+ bool flag = XSingleton<XClientNetwork>.singleton.XLoginStep == XLoginStep.Begin;
+ if (!flag)
+ {
+ XSingleton<XAttributeMgr>.singleton.XPlayerCharacters.PlayerBriefInfo.Clear();
+ XSingleton<XAttributeMgr>.singleton.XPlayerCharacters.SelectedSlot = 0;
+ XSingleton<XClientNetwork>.singleton.XLoginStep = XLoginStep.Begin;
+ XSingleton<XGame>.singleton.SwitchTo(EXStage.Login, 3u);
+ }
+ }
+
+ private void BackToLogin()
+ {
+ bool flag = XSingleton<XClientNetwork>.singleton.XLoginStep == XLoginStep.Login;
+ if (!flag)
+ {
+ XSingleton<XAttributeMgr>.singleton.XPlayerCharacters.PlayerBriefInfo.Clear();
+ XSingleton<XAttributeMgr>.singleton.XPlayerCharacters.SelectedSlot = 0;
+ XSingleton<XClientNetwork>.singleton.XLoginStep = XLoginStep.Login;
+ XSingleton<XGame>.singleton.SwitchTo(EXStage.Login, 3u);
+ }
+ }
+
+ private void SaveAccount()
+ {
+ int num = XFastEnumIntEqualityComparer<XAuthorizationChannel>.ToInt(this._channel);
+ string text = Application.persistentDataPath + "/account.txt";
+ bool flag = (int)Application.platform == 7 || (int)Application.platform == 0 || (int)Application.platform == 2;
+ if (flag)
+ {
+ text = Application.dataPath + "/account.txt";
+ }
+ try
+ {
+ File.WriteAllBytes(text, this.XCryptography(string.Format("{0}\n{1}\n{2}", num, this._account, this._pwd)));
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SetNoBackupFlag(text);
+ }
+ catch (Exception ex)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Save account file error ", ex.Message, null, null, null, null);
+ }
+ }
+
+ private void PlatformAuthorization()
+ {
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.OnPlatformLogin();
+ }
+
+ private void QQAuthorization(bool auto)
+ {
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.OnQQLogin();
+ }
+
+ private void WeChatAuthorization(bool auto)
+ {
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.OnWeChatLogin();
+ }
+
+ private void GuestAuthorization(bool auto)
+ {
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.OnGuestLogin();
+ }
+
+ private void InternalAuthorization(string account, string pwd)
+ {
+ this.OnAuthorization(account, pwd, account, XAuthorizationChannel.XAuthorization_Internal);
+ }
+
+ public void Update()
+ {
+ this._fetch_delay = false;
+ this._login_delay = false;
+ bool fetching_token = this._fetching_token;
+ if (fetching_token)
+ {
+ bool flag = this.FetchingElapsed > XLoginDocument._delay_notice_threshold;
+ if (flag)
+ {
+ this._fetch_delay = true;
+ }
+ bool flag2 = this.FetchingElapsed > XLoginDocument._max_delay_notice_threshold;
+ if (flag2)
+ {
+ this._fetching_token = false;
+ this._fetch_delay = false;
+ this.SetBlockUIVisable(false);
+ }
+ }
+ bool flag3 = this._logining && !this._in_server_queue;
+ if (flag3)
+ {
+ bool flag4 = this.LoginingElapsed > XLoginDocument._delay_notice_threshold;
+ if (flag4)
+ {
+ bool flag5 = this.LoginingElapsed > XLoginDocument._max_notice_threshold;
+ if (flag5)
+ {
+ XSingleton<XClientNetwork>.singleton.Close(NetErrCode.Net_NoError);
+ this.OnLoginTimeout();
+ }
+ else
+ {
+ this._login_delay = true;
+ }
+ }
+ }
+ }
+
+ private string PlatformComment(XAuthorizationChannel channel)
+ {
+ string result;
+ switch (channel)
+ {
+ case XAuthorizationChannel.XAuthorization_Internal:
+ result = "";
+ break;
+ case XAuthorizationChannel.XAuthorization_SD:
+ result = XStringDefineProxy.GetString("SDO_TOKEN");
+ break;
+ case XAuthorizationChannel.XAuthorization_QQ:
+ result = "QQ";
+ break;
+ case XAuthorizationChannel.XAuthorization_WeChat:
+ result = XStringDefineProxy.GetString("WECHAT_TOKEN");
+ break;
+ case XAuthorizationChannel.XAuthorization_Guest:
+ result = XStringDefineProxy.GetString("GUEST_TOKEN");
+ break;
+ default:
+ result = "";
+ break;
+ }
+ return result;
+ }
+
+ private byte[] XCryptography(string content)
+ {
+ byte[] bytes = Encoding.UTF8.GetBytes(content);
+ for (int i = 0; i < bytes.Length; i++)
+ {
+ bytes[i] ^= XLoginDocument._seed;
+ }
+ return bytes;
+ }
+
+ private string XCryptography(byte[] content)
+ {
+ for (int i = 0; i < content.Length; i++)
+ {
+ content[i] ^= XLoginDocument._seed;
+ }
+ return Encoding.UTF8.GetString(content);
+ }
+
+ public bool IsPublish()
+ {
+ return XSingleton<XUpdater.XUpdater>.singleton.XPlatform.IsPublish();
+ }
+
+ public void SetBlockUIVisable(bool state)
+ {
+ bool flag = DlgBase<XLoginView, LoginWindowBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<XLoginView, LoginWindowBehaviour>.singleton.uiBehaviour.m_BlockWindow.gameObject.SetActive(state);
+ }
+ bool flag2 = DlgBase<XSelectCharView, SelectCharWindowBehaviour>.singleton.IsVisible();
+ if (flag2)
+ {
+ DlgBase<XSelectCharView, SelectCharWindowBehaviour>.singleton.uiBehaviour.m_block.gameObject.SetActive(state);
+ }
+ }
+
+ public void ShowLoginUI()
+ {
+ bool flag = !DlgBase<XLoginView, LoginWindowBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ DlgBase<XLoginView, LoginWindowBehaviour>.singleton.ShowLogin();
+ }
+ }
+
+ public void ShowLoginSelectServerUI()
+ {
+ bool flag = !DlgBase<XLoginView, LoginWindowBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = string.IsNullOrEmpty(XSingleton<XClientNetwork>.singleton.XLoginToken);
+ if (flag2)
+ {
+ XSingleton<XLoginDocument>.singleton.AutoAuthorization(false);
+ }
+ this.ShowAfterLoginAnnouncement();
+ DlgBase<XLoginView, LoginWindowBehaviour>.singleton.ShowSelectServer();
+ DlgBase<XLoginView, LoginWindowBehaviour>.singleton.SetCurrentServer();
+ }
+ }
+
+ public void ShowSelectCharGerenalUI()
+ {
+ bool flag = !DlgBase<XSelectCharView, SelectCharWindowBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ DlgBase<XSelectCharView, SelectCharWindowBehaviour>.singleton.ShowSelectCharGerenal();
+ }
+ }
+
+ public void ShowSelectCharSelectedUI(string name, int level)
+ {
+ bool flag = !DlgBase<XSelectCharView, SelectCharWindowBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ DlgBase<XSelectCharView, SelectCharWindowBehaviour>.singleton.ShowSelectCharSelected(name, level);
+ }
+ }
+
+ public void ShowSelectCharCreatedUI()
+ {
+ bool flag = !DlgBase<XSelectCharView, SelectCharWindowBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ DlgBase<XSelectCharView, SelectCharWindowBehaviour>.singleton.ShowSelectCharCreated();
+ }
+ }
+
+ public void SetLoginZoneID(uint loginZoneId)
+ {
+ this._login_zoneid = loginZoneId;
+ }
+
+ public void SetAnnouncement(PlatNotice announcement)
+ {
+ this._announcement = announcement;
+ }
+
+ public void SetFreeflow(bool _free, int _type)
+ {
+ this._freeflow = _free;
+ this._cctype = _type;
+ }
+
+ public void SetGateIPTable(List<SelfServerData> myServersList, byte[] bytes, List<LoginGateData> serverList)
+ {
+ this._server_dic.Clear();
+ this._server_category.Clear();
+ this._zone_list.Clear();
+ this.BackFlowServerList.Clear();
+ for (int i = serverList.Count - 1; i >= 0; i--)
+ {
+ LoginGateData loginGateData = serverList[i];
+ bool isbackflow = loginGateData.isbackflow;
+ if (isbackflow)
+ {
+ bool flag = true;
+ for (int j = 0; j < this.BackFlowServerList.Count; j++)
+ {
+ bool flag2 = this.BackFlowServerList[j].ServerID == loginGateData.serverid;
+ if (flag2)
+ {
+ flag = false;
+ break;
+ }
+ }
+ bool flag3 = flag;
+ if (flag3)
+ {
+ this.BackFlowServerList.Add(this.CreateServerInfoData(loginGateData.serverid, loginGateData.servername, loginGateData.zonename, loginGateData.ip, (uint)loginGateData.port, (int)loginGateData.state, (int)loginGateData.flag, loginGateData.backflowlevel));
+ }
+ serverList.RemoveAt(i);
+ }
+ }
+ string @string = XSingleton<XStringTable>.singleton.GetString("MYSELF_SERVERS");
+ this._server_category.Add(@string, new List<int>());
+ this._zone_list.Add(@string);
+ string string2 = XSingleton<XStringTable>.singleton.GetString("BACK_SERVERS");
+ bool flag4 = this.BackFlowServerList.Count > 0;
+ if (flag4)
+ {
+ this._zone_list.Add(string2);
+ this._server_category.Add(string2, new List<int>());
+ }
+ string string3 = XSingleton<XStringTable>.singleton.GetString("FRIENDS_SERVERS");
+ this._server_category.Add(string3, new List<int>());
+ this._zone_list.Add(string3);
+ bool flag5 = myServersList.Count == 0;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("TRUE_NAME_TIP"), XStringDefineProxy.GetString("COMMON_OK"));
+ }
+ for (int k = 0; k < myServersList.Count; k++)
+ {
+ this._server_category[@string].Add(myServersList[k].servers.serverid);
+ bool flag6 = !this._server_dic.ContainsKey(myServersList[k].servers.serverid);
+ if (flag6)
+ {
+ List<string> list = new List<string>();
+ list.Add(string.Format("{0}:{1}", myServersList[k].servers.ip, myServersList[k].servers.port));
+ this._server_dic.Add(myServersList[k].servers.serverid, this.CreateServerInfoData(myServersList[k].servers.serverid, myServersList[k].servers.servername, myServersList[k].servers.zonename, myServersList[k].servers.ip, (uint)myServersList[k].servers.port, (int)myServersList[k].servers.state, (int)myServersList[k].servers.flag, myServersList[k].level));
+ }
+ for (int l = 0; l < this._backFlowServerList.Count; l++)
+ {
+ bool flag7 = this._backFlowServerList[l].ServerID == myServersList[k].servers.serverid;
+ if (flag7)
+ {
+ this._backFlowServerList[l].Level = myServersList[k].level;
+ }
+ }
+ }
+ for (int m = 0; m < serverList.Count; m++)
+ {
+ bool flag8 = !this._server_category.ContainsKey(serverList[m].zonename);
+ if (flag8)
+ {
+ this._server_category.Add(serverList[m].zonename, new List<int>());
+ this._zone_list.Add(serverList[m].zonename);
+ }
+ this._server_category[serverList[m].zonename].Add(serverList[m].serverid);
+ bool flag9 = !this._server_dic.ContainsKey(serverList[m].serverid);
+ if (flag9)
+ {
+ this._server_dic.Add(serverList[m].serverid, this.CreateServerInfoData(serverList[m].serverid, serverList[m].servername, serverList[m].zonename, serverList[m].ip, (uint)serverList[m].port, (int)serverList[m].state, (int)serverList[m].flag, 0u));
+ }
+ }
+ for (int n = 0; n < this.BackFlowServerList.Count; n++)
+ {
+ this._server_category[string2].Add(this.BackFlowServerList[n].ServerID);
+ bool flag10 = !this._server_dic.ContainsKey(this.BackFlowServerList[n].ServerID);
+ if (flag10)
+ {
+ this._server_dic.Add(this.BackFlowServerList[n].ServerID, this.BackFlowServerList[n]);
+ }
+ }
+ }
+
+ public void SetFriendServerList(List<PlatFriendServer> friendList)
+ {
+ this.FriendServerDic.Clear();
+ this.FriendOpenid.Clear();
+ for (int i = 0; i < friendList.Count; i++)
+ {
+ ServerInfo serverData = this.GetServerData(friendList[i].serverid);
+ bool flag = serverData == null;
+ if (!flag)
+ {
+ bool flag2 = !XSingleton<XGame>.singleton.IsGMAccount;
+ if (flag2)
+ {
+ bool flag3 = serverData.StateTxt == 6;
+ if (flag3)
+ {
+ goto IL_C4;
+ }
+ }
+ FriendServerInfo friendServerInfo = new FriendServerInfo();
+ friendServerInfo.info = friendList[i];
+ friendServerInfo.account = "";
+ friendServerInfo.icon = "";
+ this.FriendServerDic[friendList[i].openid] = friendServerInfo;
+ this.FriendOpenid.Add(friendList[i].openid);
+ }
+ IL_C4:;
+ }
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendGameExData("QueryFriends", "");
+ }
+
+ public void SetFriendServerIcon()
+ {
+ for (int i = 0; i < XSingleton<PDatabase>.singleton.friendsInfo.data.Length; i++)
+ {
+ bool flag = this.FriendServerDic.ContainsKey(XSingleton<PDatabase>.singleton.friendsInfo.data[i].openId);
+ if (flag)
+ {
+ this.FriendServerDic[XSingleton<PDatabase>.singleton.friendsInfo.data[i].openId].account = XSingleton<PDatabase>.singleton.friendsInfo.data[i].nickName;
+ this.FriendServerDic[XSingleton<PDatabase>.singleton.friendsInfo.data[i].openId].icon = XSingleton<PDatabase>.singleton.friendsInfo.data[i].pictureLarge;
+ }
+ }
+ }
+
+ public ServerInfo CreateServerInfoData(int serverID, string serverName, string zoneName, string ip, uint port, int state, int stateTxt, uint level)
+ {
+ return new ServerInfo
+ {
+ ServerID = serverID,
+ ServerName = serverName,
+ ZoneName = zoneName,
+ Ip = ip,
+ Port = port,
+ State = state,
+ StateTxt = stateTxt,
+ Level = level
+ };
+ }
+
+ public ServerInfo GetServerData(int id)
+ {
+ ServerInfo serverInfo;
+ bool flag = this._server_dic.TryGetValue(id, out serverInfo);
+ ServerInfo result;
+ if (flag)
+ {
+ result = serverInfo;
+ }
+ else
+ {
+ result = null;
+ }
+ return result;
+ }
+
+ public void OnServerChanged(int id)
+ {
+ ServerInfo serverData = this.GetServerData(id);
+ bool flag = serverData == null;
+ if (!flag)
+ {
+ bool flag2 = XSingleton<XClientNetwork>.singleton.OnServerChanged(serverData);
+ if (flag2)
+ {
+ this._view.SetCurrentServer();
+ }
+ }
+ }
+
+ public bool OnLoginForbidClick(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this.BackToLogin();
+ return true;
+ }
+
+ public void SetLoginReconnect(LoginReconnectInfo info)
+ {
+ this._login_reconnect_info = info;
+ }
+
+ public void ShowLoginReconnect()
+ {
+ bool flag = this._login_reconnect_info == null || this._login_reconnect_info.scenetemplateid == 0u;
+ if (!flag)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(this._login_reconnect_info.scenetemplateid);
+ string @string = XStringDefineProxy.GetString("LOGIN_RECONNECT_TIP", new object[]
+ {
+ (sceneData != null) ? sceneData.Comment : ""
+ });
+ XSingleton<UiUtility>.singleton.ShowModalDialog(@string, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnStartLoginReconnectClicked), new ButtonClickEventHandler(this.OnCancelLoginReconnectClicked), false, XTempTipDefine.OD_START, 50);
+ }
+ }
+
+ private bool OnStartLoginReconnectClicked(IXUIButton btn)
+ {
+ RpcC2N_LoginReconnectReq rpcC2N_LoginReconnectReq = new RpcC2N_LoginReconnectReq();
+ rpcC2N_LoginReconnectReq.oArg.reconnect = true;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2N_LoginReconnectReq);
+ this._login_reconnect_info = null;
+ this.SetBlockUIVisable(true);
+ return true;
+ }
+
+ private bool OnCancelLoginReconnectClicked(IXUIButton btn)
+ {
+ RpcC2N_LoginReconnectReq rpcC2N_LoginReconnectReq = new RpcC2N_LoginReconnectReq();
+ rpcC2N_LoginReconnectReq.oArg.reconnect = false;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2N_LoginReconnectReq);
+ this._login_reconnect_info = null;
+ this.SetBlockUIVisable(true);
+ return true;
+ }
+ }
+}