From 36c8ee99424475b255ec7bc665e26eb779ae692d Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Thu, 21 Aug 2025 17:37:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=9A=E5=AE=A2=E5=AE=A4=E6=8D=A2?= =?UTF-8?q?=E7=8F=AD=E5=A4=B1=E8=B4=A5=EF=BC=88=E5=A6=82=E9=80=89=E4=BA=BA?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E4=B8=AD=E5=BC=B9=E5=87=BA=E7=BA=BF=E7=B4=A2?= =?UTF-8?q?=E4=BA=A4=E6=B5=81=E5=AE=8C=E6=88=90=EF=BC=89=E6=97=B6=E9=87=8D?= =?UTF-8?q?=E5=BC=80=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #13449 --- .../Task/Infrast/InfrastReceptionTask.cpp | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/MaaCore/Task/Infrast/InfrastReceptionTask.cpp b/src/MaaCore/Task/Infrast/InfrastReceptionTask.cpp index a4d3d895e9..25aa109839 100644 --- a/src/MaaCore/Task/Infrast/InfrastReceptionTask.cpp +++ b/src/MaaCore/Task/Infrast/InfrastReceptionTask.cpp @@ -55,12 +55,10 @@ bool asst::InfrastReceptionTask::_run() } if (!m_skip_shift) { - shift(); - } - else { - Log.info("skip shift in rotation mode"); + return shift(); } + Log.info("skip shift in rotation mode"); return true; } @@ -234,20 +232,18 @@ bool asst::InfrastReceptionTask::shift() close_quick_formation_expand_role(); - for (int i = 0; i <= OperSelectRetryTimes; ++i) { + int retry_times; + for (retry_times = 0; retry_times <= OperSelectRetryTimes; ++retry_times) { if (need_exit()) { return false; } if (is_use_custom_opers()) { - bool name_select_ret = swipe_and_select_custom_opers(); - if (name_select_ret) { + if (swipe_and_select_custom_opers()) { break; } - else { - swipe_to_the_left_of_operlist(); - continue; - } + swipe_to_the_left_of_operlist(); + continue; } if (!opers_detect_with_swipe()) { @@ -267,6 +263,11 @@ bool asst::InfrastReceptionTask::shift() } break; } + + if (retry_times > OperSelectRetryTimes) { + return false; + } + click_confirm_button(); return true; }