diff --git a/src/MaaCore/Task/Miscellaneous/BattleFormationTask.cpp b/src/MaaCore/Task/Miscellaneous/BattleFormationTask.cpp index 5cdad97c59..a18283524d 100644 --- a/src/MaaCore/Task/Miscellaneous/BattleFormationTask.cpp +++ b/src/MaaCore/Task/Miscellaneous/BattleFormationTask.cpp @@ -157,11 +157,6 @@ std::vector asst::BattleFormationTask::analyzer_opers() } sort_by_vertical_(opers_result); - if (m_the_right_name == opers_result.back().text) { - return {}; - } - m_the_right_name = opers_result.back().text; - std::vector tr_res; for (const auto& res : opers_result) { tr_res.emplace_back(TextRect { res.rect, res.score, res.text }); @@ -256,7 +251,7 @@ bool asst::BattleFormationTask::click_role_table(battle::Role role) { battle::Role::Sniper, "Sniper" }, { battle::Role::Special, "Special" }, { battle::Role::Support, "Support" }, { battle::Role::Tank, "Tank" }, { battle::Role::Warrior, "Warrior" }, { battle::Role::Unknown, "All" }, }; - m_the_right_name.clear(); + m_last_oper_name.clear(); auto role_iter = RoleNameType.find(role); if (role_iter == RoleNameType.cend()) { diff --git a/src/MaaCore/Task/Miscellaneous/BattleFormationTask.h b/src/MaaCore/Task/Miscellaneous/BattleFormationTask.h index 221e04036d..0448cb43f1 100644 --- a/src/MaaCore/Task/Miscellaneous/BattleFormationTask.h +++ b/src/MaaCore/Task/Miscellaneous/BattleFormationTask.h @@ -53,11 +53,9 @@ namespace asst std::string m_stage_name; std::unordered_map> m_formation; - std::string m_the_right_name; std::string m_support_unit_name; DataResource m_data_resource = DataResource::Copilot; std::vector m_additional; - std::string m_last_oper_name; }; }