合并。

This commit is contained in:
秋云
2025-01-08 00:53:49 +08:00
parent a85129b087
commit b9dd66f87a

View File

@@ -19,6 +19,7 @@ using System.Threading.Tasks;
using BetterGenshinImpact.GameTask.Common.Exceptions;
using Vanara.PInvoke;
using static BetterGenshinImpact.GameTask.Common.TaskControl;
using BetterGenshinImpact.Core.Simulator.Extensions;
namespace BetterGenshinImpact.GameTask.AutoTrackPath;
@@ -151,7 +152,7 @@ public class TpTask(CancellationToken ct)
return (clickX, clickY);
}
public async Task<(double, double)> Tp(double tpX, double tpY, bool force = false)
private async Task checkInBigMapUi()
{
// M 打开地图识别当前位置,中心点为当前位置
var ra1 = CaptureToRectArea();
@@ -163,7 +164,7 @@ public class TpTask(CancellationToken ct)
await Delay(1000, ct);
ra1 = CaptureToRectArea();
}
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_M);
Simulation.SendInput.SimulateAction(GIActions.OpenMap);
await Delay(1000, ct);
for (int i = 0; i < 3; i++)
{
@@ -173,8 +174,11 @@ public class TpTask(CancellationToken ct)
await Delay(500, ct);
}
}
}
}
}
public async Task<(double, double)> Tp(double tpX, double tpY, bool force = false)
{
await checkInBigMapUi();
for (var i = 0; i < 3; i++)
{
try