From 2b0109127f4128ea0218f5dddd2a08f8a4b0ceea Mon Sep 17 00:00:00 2001 From: Lemon-miaow Date: Tue, 15 Jul 2025 00:57:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BC=9A=E5=AE=A2?= =?UTF-8?q?=E5=AE=A4=E7=BA=BF=E7=B4=A2=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= =?UTF-8?q?=20(#13160)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 优化会客室线索处理逻辑 * chore: Auto update by pre-commit hooks [skip changelog] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .../Task/Infrast/InfrastReceptionTask.cpp | 24 ++++++++++++++----- .../Task/Infrast/InfrastReceptionTask.h | 3 ++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/MaaCore/Task/Infrast/InfrastReceptionTask.cpp b/src/MaaCore/Task/Infrast/InfrastReceptionTask.cpp index a1a9f31088..37cf613be3 100644 --- a/src/MaaCore/Task/Infrast/InfrastReceptionTask.cpp +++ b/src/MaaCore/Task/Infrast/InfrastReceptionTask.cpp @@ -30,11 +30,19 @@ bool asst::InfrastReceptionTask::_run() close_end_of_clue_exchange(); - // 防止送线索把可以填入的送了 + get_friend_clue(); + if (need_exit()) { + return false; + } + use_clue(); back_to_reception_main(); - get_clue(); + if (need_exit()) { + return false; + } + + get_self_clue(); if (need_exit()) { return false; } @@ -67,11 +75,15 @@ bool asst::InfrastReceptionTask::close_end_of_clue_exchange() return task_temp.run(); } -bool asst::InfrastReceptionTask::get_clue() +bool asst::InfrastReceptionTask::get_friend_clue() { - ProcessTask task_temp( - *this, - { "InfrastClueSelfNew", "InfrastClueFriendNew", "InfrastClueSelfMaybeFull", "ReceptionFlag" }); + ProcessTask task_temp(*this, { "InfrastClueFriendNew", "ReceptionFlag" }); + return task_temp.set_retry_times(ProcessTask::RetryTimesDefault).run(); +} + +bool asst::InfrastReceptionTask::get_self_clue() +{ + ProcessTask task_temp(*this, { "InfrastClueSelfNew", "InfrastClueSelfMaybeFull", "ReceptionFlag" }); return task_temp.set_retry_times(ProcessTask::RetryTimesDefault).run(); } diff --git a/src/MaaCore/Task/Infrast/InfrastReceptionTask.h b/src/MaaCore/Task/Infrast/InfrastReceptionTask.h index 7afc45ed2c..d2485f0cbe 100644 --- a/src/MaaCore/Task/Infrast/InfrastReceptionTask.h +++ b/src/MaaCore/Task/Infrast/InfrastReceptionTask.h @@ -22,7 +22,8 @@ private: // 收取信息板的周限300信用 bool receive_message_board(); bool close_end_of_clue_exchange(); - bool get_clue(); + bool get_friend_clue(); + bool get_self_clue(); bool use_clue(); bool proc_clue_vacancy(); bool unlock_clue_exchange();