From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../PTC/Process/Process_RpcC2G_EnterWatchBattle.cs | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_EnterWatchBattle.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_EnterWatchBattle.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_EnterWatchBattle.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_EnterWatchBattle.cs new file mode 100644 index 00000000..9912f81b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_EnterWatchBattle.cs @@ -0,0 +1,45 @@ +using System; +using System.Reflection; +using KKSG; +using XMainClient.UI; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_RpcC2G_EnterWatchBattle + { + public static void OnReply(EnterWatchBattleArg oArg, EnterWatchBattleRes oRes) + { + bool flag = oRes.error == ErrorCode.ERR_INVALID_REQUEST; + if (flag) + { + string fullName = MethodBase.GetCurrentMethod().ReflectedType.FullName; + XSingleton.singleton.OnGetInvalidRequest(fullName); + } + else + { + XSpectateDocument specificDocument = XDocuments.GetSpecificDocument(XSpectateDocument.uuID); + bool flag2 = oRes.error > ErrorCode.ERR_SUCCESS; + if (flag2) + { + bool flag3 = oRes.error == ErrorCode.ERR_WATCH_LIVEISFULL || oRes.error == ErrorCode.ERR_WATCH_LIVEISOVER; + if (flag3) + { + specificDocument.EnterLiveError(oRes.error == ErrorCode.ERR_WATCH_LIVEISOVER); + } + XSingleton.singleton.ShowSystemTip(oRes.error, "fece00"); + specificDocument.IsLoadingSpectateScene = false; + } + else + { + XSpectateSceneDocument specificDocument2 = XDocuments.GetSpecificDocument(XSpectateSceneDocument.uuID); + specificDocument2.IsBlueTeamDict.Clear(); + } + } + } + + public static void OnTimeout(EnterWatchBattleArg oArg) + { + } + } +} -- cgit v1.1-26-g67d0