diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_BattleResultNtf.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_BattleResultNtf.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_BattleResultNtf.cs | 49 |
1 files changed, 49 insertions, 0 deletions
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>(XLevelRewardDocument.uuID);
+ bool flag2 = !specificDocument.RequestServer && !XSingleton<XGame>.singleton.SyncMode;
+ if (!flag2)
+ {
+ bool haveBattleResultData = XSingleton<XLevelFinishMgr>.singleton.HaveBattleResultData;
+ if (!haveBattleResultData)
+ {
+ bool flag3 = specificDocument.CurrentScene != roPtc.Data.stageInfo.stageID;
+ if (!flag3)
+ {
+ XSingleton<XLevelFinishMgr>.singleton.HaveBattleResultData = true;
+ specificDocument.RequestServer = false;
+ XSingleton<XCutScene>.singleton.Stop(true);
+ bool isStageFailed = roPtc.Data.stageInfo.isStageFailed;
+ if (isStageFailed)
+ {
+ XSingleton<XLevelFinishMgr>.singleton.OnLevelFailed();
+ }
+ else
+ {
+ bool flag4 = !XSingleton<XScene>.singleton.bSpectator;
+ if (flag4)
+ {
+ specificDocument.SetBattleResultData(roPtc.Data);
+ }
+ XSingleton<XLevelFinishMgr>.singleton.IsCurrentLevelWin = true;
+ XSingleton<XLevelFinishMgr>.singleton.StartLevelFinish();
+ }
+ XSingleton<XOperationRecord>.singleton.DoScriptRecord(roPtc.Data.stageInfo.stageID + "after");
+ XStaticSecurityStatistics.OnEnd();
+ }
+ }
+ }
+ }
+ }
+ }
+}
|