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_PtcG2C_BattleResultNtf.cs | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_BattleResultNtf.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_BattleResultNtf.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_BattleResultNtf.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_BattleResultNtf.cs new file mode 100644 index 00000000..b509f387 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_BattleResultNtf.cs @@ -0,0 +1,49 @@ +using System; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_PtcG2C_BattleResultNtf + { + public static void Process(PtcG2C_BattleResultNtf roPtc) + { + bool flag = roPtc.Data == null || roPtc.Data.stageInfo == null; + if (!flag) + { + XLevelRewardDocument specificDocument = XDocuments.GetSpecificDocument(XLevelRewardDocument.uuID); + bool flag2 = !specificDocument.RequestServer && !XSingleton.singleton.SyncMode; + if (!flag2) + { + bool haveBattleResultData = XSingleton.singleton.HaveBattleResultData; + if (!haveBattleResultData) + { + bool flag3 = specificDocument.CurrentScene != roPtc.Data.stageInfo.stageID; + if (!flag3) + { + XSingleton.singleton.HaveBattleResultData = true; + specificDocument.RequestServer = false; + XSingleton.singleton.Stop(true); + bool isStageFailed = roPtc.Data.stageInfo.isStageFailed; + if (isStageFailed) + { + XSingleton.singleton.OnLevelFailed(); + } + else + { + bool flag4 = !XSingleton.singleton.bSpectator; + if (flag4) + { + specificDocument.SetBattleResultData(roPtc.Data); + } + XSingleton.singleton.IsCurrentLevelWin = true; + XSingleton.singleton.StartLevelFinish(); + } + XSingleton.singleton.DoScriptRecord(roPtc.Data.stageInfo.stageID + "after"); + XStaticSecurityStatistics.OnEnd(); + } + } + } + } + } + } +} -- cgit v1.1-26-g67d0