From 9d8bbabd08c23af881c79b10087bd0618ce29fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Wed, 11 Jun 2025 05:41:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E6=AC=A1=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoFriendshipFight/main.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/repo/js/AutoFriendshipFight/main.js b/repo/js/AutoFriendshipFight/main.js index 5b26f8d9..db808460 100644 --- a/repo/js/AutoFriendshipFight/main.js +++ b/repo/js/AutoFriendshipFight/main.js @@ -224,9 +224,14 @@ async function executeSingleFriendshipRound(roundIndex, ocrTimeout, fightTimeout if (roundIndex === 0 && enemyType === "鳄鱼") { await sleep(5000); } - - // 重新登录 - await genshin.relogin(); + let initialDetected = false; + if (roundIndex === 0) { + initialDetected = await detectTaskTrigger(3, enemyType); + } + if(!initialDetected || roundIndex > 0) { + await genshin.relogin(); + } + // 启动路径导航任务(异步) let pathTask = AutoPath(`${enemyType}-战斗点`);