From a489425a324b02468037838ed8107a4581ffd2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8F=90=E7=93=A6=E7=89=B9=E9=92=93=E9=B1=BC=E7=8E=B3?= =?UTF-8?q?=E5=B8=88?= <144542161+Hijiwos@users.noreply.github.com> Date: Tue, 22 Jul 2025 10:42:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=B7=B2=E7=9F=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#1382)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AutoFishingTeyvat/main.js | 13 ++++++++++++- repo/js/AutoFishingTeyvat/manifest.json | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/repo/js/AutoFishingTeyvat/main.js b/repo/js/AutoFishingTeyvat/main.js index 39cc2204..e0971945 100644 --- a/repo/js/AutoFishingTeyvat/main.js +++ b/repo/js/AutoFishingTeyvat/main.js @@ -568,6 +568,9 @@ await keyMouseScript.runFile(base_path_gcm + file_name + ".json"); } + // 记录钓鱼开始时间 + const time_start = Date.now(); + // 调用自动钓鱼 await dispatcher.runTask(new SoloTask("AutoFishing", { "fishingTimePolicy": fishing_time_dic[fishing_time]["param"], @@ -575,8 +578,16 @@ "wholeProcessTimeoutSeconds": time_out_whole })); - if (fishing_cd) { + // 记录钓鱼结束时间 + const time_end = Date.now(); + + // 钓鱼是否正常结束,间隔时间大于5s + const flag = (time_end - time_start) >= 5000; + + if (fishing_cd && flag) { write_archive(file_name, fishing_time, Date.now(), uid); + } else if (fishing_cd && !flag) { + log.warn(`本次钓鱼异常,不计算垂钓点CD`); } } diff --git a/repo/js/AutoFishingTeyvat/manifest.json b/repo/js/AutoFishingTeyvat/manifest.json index 7779bcfa..8d829c29 100644 --- a/repo/js/AutoFishingTeyvat/manifest.json +++ b/repo/js/AutoFishingTeyvat/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "提瓦特自动钓鱼(全流程+自选)", - "version": "2.2.3", + "version": "2.2.4", "bgi_version": "0.47.0", "description": "支持自动追踪并垂钓bgi支持的全提瓦特垂钓点", "authors": [