From 9237dddda414e4107b568d6c06167924742fb4a4 Mon Sep 17 00:00:00 2001 From: momomochi987 <45387477+momomochi987@users.noreply.github.com> Date: Mon, 1 Jun 2026 17:08:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20AccountSwitchTask=20=E6=94=AF=E6=8F=B4?= =?UTF-8?q?=E7=B9=81=E4=B8=AD=E6=9C=8D=E5=AE=A2=E6=88=B6=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 _run/select_account 將 txwy 視為與 Official 同類,套用 char model OCR - navigate_to_start_page 認得 AccountManagerTxwy 作為登入頁入口 - SupportedClientType 將 txwy 從註解移到實際列表 --- src/MaaCore/Task/Miscellaneous/AccountSwitchTask.cpp | 7 +++++-- src/MaaCore/Task/Miscellaneous/AccountSwitchTask.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/MaaCore/Task/Miscellaneous/AccountSwitchTask.cpp b/src/MaaCore/Task/Miscellaneous/AccountSwitchTask.cpp index 87e4476f71..0f23ec11c9 100644 --- a/src/MaaCore/Task/Miscellaneous/AccountSwitchTask.cpp +++ b/src/MaaCore/Task/Miscellaneous/AccountSwitchTask.cpp @@ -36,7 +36,7 @@ bool asst::AccountSwitchTask::_run() bool equal = false; Log.info(m_client_type); - if (m_client_type == "Official") { + if (m_client_type == "Official" || m_client_type == "txwy") { equal = equal_current_account(); } else if (m_client_type == "Bilibili") { @@ -77,6 +77,9 @@ bool asst::AccountSwitchTask::navigate_to_start_page() else if (last_name == "AccountManagerBili") { return true; } + else if (last_name == "AccountManagerTxwy") { + return true; + } return false; } @@ -148,7 +151,7 @@ bool asst::AccountSwitchTask::select_account() sleep(200); auto raw_img = ctrler()->get_image(); OCRer ocr(ctrler()->get_image()); - if (m_client_type == "Official") { + if (m_client_type == "Official" || m_client_type == "txwy") { ocr.set_use_char_model(true); } else if (m_client_type == "Bilibili") { diff --git a/src/MaaCore/Task/Miscellaneous/AccountSwitchTask.h b/src/MaaCore/Task/Miscellaneous/AccountSwitchTask.h index 83052b5151..6ec1cc5845 100644 --- a/src/MaaCore/Task/Miscellaneous/AccountSwitchTask.h +++ b/src/MaaCore/Task/Miscellaneous/AccountSwitchTask.h @@ -36,6 +36,6 @@ private: std::string m_target_account; std::string m_client_type; // 客户端类型 const std::vector - SupportedClientType = { "Official", "Bilibili" /*, "YoStarEN", "YoStarJP", "YoStarKR", "txwy" */ }; + SupportedClientType = { "Official", "Bilibili", "txwy" /*, "YoStarEN", "YoStarJP", "YoStarKR" */ }; }; }