From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Process/Process_RpcC2T_ClientLoginRequest.cs | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2T_ClientLoginRequest.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2T_ClientLoginRequest.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2T_ClientLoginRequest.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2T_ClientLoginRequest.cs new file mode 100644 index 00000000..6186c7a9 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2T_ClientLoginRequest.cs @@ -0,0 +1,77 @@ +using System; +using System.Reflection; +using KKSG; +using XMainClient.UI; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_RpcC2T_ClientLoginRequest + { + public static void OnReply(LoginArg oArg, LoginRes oRes) + { + bool flag = oRes.result == ErrorCode.ERR_INVALID_REQUEST; + if (flag) + { + string fullName = MethodBase.GetCurrentMethod().ReflectedType.FullName; + XSingleton.singleton.OnGetInvalidRequest(fullName); + } + else + { + XSingleton.singleton.AddLog("Login Rpc Reply.", null, null, null, null, null, XDebugColor.XDebug_None); + bool flag2 = oRes.result == ErrorCode.ERR_SUCCESS; + if (flag2) + { + Process_RpcC2T_ClientLoginRequest.ProcessAccountData(oRes.accountData); + Process_RpcC2T_ClientLoginRequest.ProcessLoginExtraData(oRes.data); + XSingleton.singleton.EnterToSelectChar(); + XSingleton.singleton.SetLoginReconnect(oRes.rinfo); + } + else + { + ErrorCode result = oRes.result; + if (result != ErrorCode.ERR_LOGIN_VERIFY_FAILED) + { + if (result != ErrorCode.ERR_VERSION_FAILED) + { + if (result != ErrorCode.ERR_ACCOUNT_QUEUING) + { + XSingleton.singleton.OnLoginFailed(XStringDefineProxy.GetString(oRes.result)); + } + else + { + Process_RpcC2T_ClientLoginRequest.ProcessAccountData(oRes.accountData); + XSingleton.singleton.ShowServerQueue(); + } + } + else + { + XSingleton.singleton.OnServerErrorNotify((uint)XFastEnumIntEqualityComparer.ToInt(oRes.result), oRes.version); + } + } + else + { + XSingleton.singleton.OnAuthorizedFailed(); + } + } + } + } + + public static void OnTimeout(LoginArg oArg) + { + XSingleton.singleton.AddLog("Login Rpc Timeout.", null, null, null, null, null, XDebugColor.XDebug_None); + XSingleton.singleton.XPlayerCharacters.PlayerBriefInfo.Clear(); + XSingleton.singleton.XPlayerCharacters.SelectedSlot = 0; + } + + public static void ProcessAccountData(LoadAccountData roAccountData) + { + XSingleton.singleton.ProcessAccountData(roAccountData); + } + + public static void ProcessLoginExtraData(LoginExtraData data) + { + XSingleton.singleton.ProcessLoginExtraData(data); + } + } +} -- cgit v1.1-26-g67d0