From b4fc3528decd6777441a8aca684c22d35d2b2574 Mon Sep 17 00:00:00 2001 From: Constrat <56174894+Constrat@users.noreply.github.com.> Date: Sun, 19 May 2024 10:39:32 +0200 Subject: [PATCH] fix: adding delay between swipe and click --- src/MaaCore/Task/Infrast/InfrastAbstractTask.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MaaCore/Task/Infrast/InfrastAbstractTask.cpp b/src/MaaCore/Task/Infrast/InfrastAbstractTask.cpp index 9f0902262c..65a20f542a 100644 --- a/src/MaaCore/Task/Infrast/InfrastAbstractTask.cpp +++ b/src/MaaCore/Task/Infrast/InfrastAbstractTask.cpp @@ -199,7 +199,7 @@ bool asst::InfrastAbstractTask::enter_facility(int index) Log.warn("index out of range:", index, m_custom_config.size()); return false; } - + InfrastFacilityImageAnalyzer analyzer(ctrler()->get_image()); analyzer.set_to_be_analyzed({ facility_name() }); if (!analyzer.analyze()) { @@ -211,6 +211,8 @@ bool asst::InfrastAbstractTask::enter_facility(int index) Log.info("facility index is out of range"); return false; } + // 点击前先等一下,避免点太快 | Wait a moment before clicking to avoid clicking too fast + sleep(500); ctrler()->click(rect); m_cur_facility_index = index;