pathing opt

This commit is contained in:
辉鸭蛋 2024-10-31 23:10:11 +08:00
parent b0d8e1a274
commit b0d4068eb2
2 changed files with 8 additions and 1 deletions

View File

@ -180,7 +180,7 @@ public class PathExecutor(CancellationToken ct)
{
await Bv.WaitForMainUi(ct); // 等待主界面加载完成
Logger.LogInformation("复苏完成");
await Delay(3000, ct);
await Delay(4000, ct);
// 血量肯定不满,直接去七天神像回血
await TpStatueOfTheSeven();
throw new RetryException("回血完成后重试路线");

View File

@ -5,6 +5,7 @@ using BetterGenshinImpact.GameTask.Common.BgiVision;
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Vanara.PInvoke;
using static BetterGenshinImpact.GameTask.Common.TaskControl;
@ -30,6 +31,7 @@ public class TrapEscaper(CancellationToken ct)
public async Task MoveTo(WaypointForTrack waypoint)
{
var startTime = DateTime.UtcNow;
bool left = false;
var screen = CaptureToRectArea();
var position = Navigation.GetPosition(screen);
@ -46,6 +48,11 @@ public class TrapEscaper(CancellationToken ct)
{
break;
}
if ((now - startTime).TotalSeconds > 25)
{
Logger.LogError("卡死脱困超时!");
break;
}
screen = CaptureToRectArea();
position = Navigation.GetPosition(screen);