From 3c5a6304211caad88ccaf26c833faaad3864de9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Sun, 18 May 2025 15:37:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=B0=E8=84=89=E8=8A=B1js=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E6=AC=A1=E6=9C=AA=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoLeyLineOutcrop/main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/repo/js/AutoLeyLineOutcrop/main.js b/repo/js/AutoLeyLineOutcrop/main.js index 04cc20d4..f2b99f8c 100644 --- a/repo/js/AutoLeyLineOutcrop/main.js +++ b/repo/js/AutoLeyLineOutcrop/main.js @@ -696,15 +696,17 @@ async function findLeyLineOutcrop(country, type) { const positions = config.mapPositions[country]; await genshin.moveMapTo(positions[0].x, positions[0].y, country); + const found = await locateLeyLineOutcrop(type); + await sleep(1000); // 移动后等一下 + if (found) return; for (let retryCount = 1; retryCount < positions.length; retryCount++) { - const found = await locateLeyLineOutcrop(type); - if (found) return; const position = positions[retryCount]; log.info(`第 ${retryCount + 1} 次尝试定位地脉花`); log.info(`移动到位置:(${position.x}, ${position.y}), ${position.name || '未命名位置'}`); await genshin.moveMapTo(position.x, position.y); - - await sleep(1000); // 移动后等一下 + + const found = await locateLeyLineOutcrop(type); + if (found) return; } // 如果到这里还没找到