diff options
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2M_CreateRoleNew.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2M_CreateRoleNew.cs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2M_CreateRoleNew.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2M_CreateRoleNew.cs new file mode 100644 index 00000000..3f011702 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2M_CreateRoleNew.cs @@ -0,0 +1,60 @@ +using System;
+using System.Reflection;
+using KKSG;
+using XMainClient.UI;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class Process_RpcC2M_CreateRoleNew
+ {
+ public static void OnReply(CreateRoleNewArg oArg, CreateRoleNewRes oRes)
+ {
+ bool flag = oRes == null;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowErrorCode(ErrorCode.ERR_FAILED);
+ }
+ else
+ {
+ bool flag2 = oRes.result == ErrorCode.ERR_INVALID_REQUEST;
+ if (flag2)
+ {
+ string fullName = MethodBase.GetCurrentMethod().ReflectedType.FullName;
+ XSingleton<UiUtility>.singleton.OnGetInvalidRequest(fullName);
+ }
+ else
+ {
+ XSingleton<XLoginDocument>.singleton.SetBlockUIVisable(false);
+ ErrorCode result = oRes.result;
+ if (result <= ErrorCode.ERR_INVALID_NAME)
+ {
+ if (result == ErrorCode.ERR_SUCCESS)
+ {
+ RpcC2M_SelectRoleNew rpcC2M_SelectRoleNew = new RpcC2M_SelectRoleNew();
+ rpcC2M_SelectRoleNew.oArg.index = (int)(oArg.type) % 10 - (int)RoleType.Role_Warrior;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2M_SelectRoleNew);
+ return;
+ }
+ if (result - ErrorCode.ERR_NAME_EXIST > 1)
+ {
+ goto IL_D3;
+ }
+ }
+ else if (result != ErrorCode.ERR_WORD_FORBID && result - ErrorCode.ERR_NAME_ALLNUM > 2)
+ {
+ goto IL_D3;
+ }
+ XSingleton<UiUtility>.singleton.ShowSystemTip(oRes.result, "fece00");
+ return;
+ IL_D3:
+ XSingleton<XClientNetwork>.singleton.OnServerErrorNotify((uint)oRes.result, null);
+ }
+ }
+ }
+
+ public static void OnTimeout(CreateRoleNewArg oArg)
+ {
+ }
+ }
+}
|