From fe1e105df38a057aee6d6cc26d80e56983f51151 Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Fri, 1 Nov 2024 22:55:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Revert=20"fix:=20=E8=A6=81=E6=B1=82?= =?UTF-8?q?=E6=AF=8F=E6=AC=A1=E8=BF=9B=E5=85=A5=E5=9F=BA=E5=BB=BA=E5=AE=BF?= =?UTF-8?q?=E8=88=8D=E5=90=8E=E9=83=BD=E9=87=8D=E6=96=B0=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=B8=80=E9=81=8D=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=20(#1096?= =?UTF-8?q?8)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b28ffcc13e59fe94250ae1c11acf6e259cfb91d1. --- src/MaaCore/Task/Infrast/InfrastDormTask.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/MaaCore/Task/Infrast/InfrastDormTask.cpp b/src/MaaCore/Task/Infrast/InfrastDormTask.cpp index 9b6d2ecdc0..e1e6533c32 100644 --- a/src/MaaCore/Task/Infrast/InfrastDormTask.cpp +++ b/src/MaaCore/Task/Infrast/InfrastDormTask.cpp @@ -50,13 +50,10 @@ bool asst::InfrastDormTask::_run() } Log.trace("m_dorm_notstationed_enabled:", m_dorm_notstationed_enabled); - if (m_dorm_notstationed_enabled) { + if (m_dorm_notstationed_enabled && !m_if_filter_notstationed_haspressed) { Log.trace("click_filter_menu_not_stationed_button"); - // 在此处不进行 m_if_filter_notstationed_haspressed 的判断,即必须重新选择一次筛选条件 - if (click_filter_menu_not_stationed_button()) { - Log.info("successfully set filter to [Not Assigned]"); - m_if_filter_notstationed_haspressed = true; - } + click_filter_menu_not_stationed_button(); + m_if_filter_notstationed_haspressed = true; } if (!m_is_custom || current_room_config().autofill) { From c3f034f977e66df8c07c2aef3b75be1f037fe672 Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Fri, 1 Nov 2024 23:00:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=9F=BA=E5=BB=BA=E6=8D=A2=E7=8F=AD?= =?UTF-8?q?=E5=AE=BF=E8=88=8D=E4=BB=BB=E5=8A=A1=E6=9C=9F=E9=97=B4=E9=87=8D?= =?UTF-8?q?=E8=BF=9B=E5=AE=BF=E8=88=8D=E5=90=8E=EF=BC=8C=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=8A=B6=E6=80=81=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Task/Infrast/InfrastDormTask.cpp | 6 ++++++ src/MaaCore/Task/Infrast/InfrastDormTask.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/MaaCore/Task/Infrast/InfrastDormTask.cpp b/src/MaaCore/Task/Infrast/InfrastDormTask.cpp index e1e6533c32..882756452d 100644 --- a/src/MaaCore/Task/Infrast/InfrastDormTask.cpp +++ b/src/MaaCore/Task/Infrast/InfrastDormTask.cpp @@ -23,6 +23,12 @@ asst::InfrastDormTask& asst::InfrastDormTask::set_trust_enabled(bool dorm_trust_ return *this; } +bool asst::InfrastDormTask::on_run_fails() +{ + m_if_filter_notstationed_haspressed = false; + return asst::InfrastAbstractTask::on_run_fails(); +} + bool asst::InfrastDormTask::_run() { for (; m_cur_facility_index < m_max_num_of_dorm; ++m_cur_facility_index) { diff --git a/src/MaaCore/Task/Infrast/InfrastDormTask.h b/src/MaaCore/Task/Infrast/InfrastDormTask.h index 4903b17f1d..7d8e6390ec 100644 --- a/src/MaaCore/Task/Infrast/InfrastDormTask.h +++ b/src/MaaCore/Task/Infrast/InfrastDormTask.h @@ -14,6 +14,9 @@ public: InfrastDormTask& set_notstationed_enabled(bool dorm_notstationed_enabled) noexcept; InfrastDormTask& set_trust_enabled(bool m_dorm_trust_enabled) noexcept; +protected: + virtual bool on_run_fails() override; + private: virtual bool _run() override; // virtual bool click_confirm_button() override;