diff --git a/resource/tasks.json b/resource/tasks.json index 4c6549a2d5..4125d2915d 100644 --- a/resource/tasks.json +++ b/resource/tasks.json @@ -10,6 +10,7 @@ "UseMedicine", "UseStone", "EndOfAction", + "PrtsErrorConfirm", "OfflineConfirm", "StartToWakeUp", "TodaysSupplies", @@ -64,6 +65,7 @@ "PRTS", "PrtsErrorConfirm", "EndOfAction", + "OfflineConfirm", "WaitAfterPRTS" ] }, @@ -174,21 +176,38 @@ }, "PrtsErrorConfirm": { "template": "PrtsErrorConfirm.png", + "templThreshold": 0.8, + "cache": false, "action": "doNothing", "next": [ - "AbandonAction" + "AbandonAction", + "OfflineConfirmAfterBattle" ] }, "AbandonAction": { "template": "AbandonAction.png", "action": "clickSelf", + "cache": false, "reduceOtherTimes": [ "StartButton1", "StartButton2", "Loading" ], "next": [ - "EndOfAction" + "EndOfAction", + "StartToWakeUp", + "OfflineConfirm" + ] + }, + "OfflineConfirmAfterBattle": { + "template": "PopupConfirm.png", + "action": "clickSelf", + "cache": false, + "next": [ + "PRTS", + "PrtsErrorConfirm", + "OfflineConfirm", + "StartToWakeUp" ] }, "OfflineConfirm": { diff --git a/src/MeoAsstGui/Helper/AsstProxy.cs b/src/MeoAsstGui/Helper/AsstProxy.cs index ab0ac8f80e..c6ccc389b7 100644 --- a/src/MeoAsstGui/Helper/AsstProxy.cs +++ b/src/MeoAsstGui/Helper/AsstProxy.cs @@ -4,6 +4,7 @@ using Stylet; using StyletIoC; using System; using System.Runtime.InteropServices; +using System.Threading.Tasks; using System.Windows; namespace MeoAsstGui @@ -154,8 +155,13 @@ namespace MeoAsstGui mfvm.RunStatus = "出现错误,已停止运行"; break; } + ++_retryTimes; - AsstStartSanity(); + Task.Run(() => + { + AsstStop(); + AsstStartSanity(); + }); } } break; diff --git a/src/MeoAsstGui/MeoAsstGui.csproj b/src/MeoAsstGui/MeoAsstGui.csproj index 394a12cbae..22c2962b44 100644 --- a/src/MeoAsstGui/MeoAsstGui.csproj +++ b/src/MeoAsstGui/MeoAsstGui.csproj @@ -326,7 +326,6 @@ - - + xcopy /e /y /i /c $(SolutionDir)resource $(TargetDir)resource \ No newline at end of file