From d38f5b2d6bf403a4fda6d55e1108a081fc985a68 Mon Sep 17 00:00:00 2001 From: Horror Proton <107091537+horror-proton@users.noreply.github.com> Date: Fri, 20 Oct 2023 11:36:22 +0800 Subject: [PATCH] chore: fix typos [skip changelog] --- .../Task/Roguelike/RoguelikeBattleTaskPlugin.cpp | 6 +++--- .../Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/MaaCore/Task/Roguelike/RoguelikeBattleTaskPlugin.cpp b/src/MaaCore/Task/Roguelike/RoguelikeBattleTaskPlugin.cpp index d53984a75c..8dc931f15b 100644 --- a/src/MaaCore/Task/Roguelike/RoguelikeBattleTaskPlugin.cpp +++ b/src/MaaCore/Task/Roguelike/RoguelikeBattleTaskPlugin.cpp @@ -794,10 +794,10 @@ std::vector asst::RoguelikeBattleTaskPlugin::available_locations(ba { std::vector result; for (const auto& [loc, tile] : m_normal_tile_info) { - bool position_mathced = tile.buildable == type || tile.buildable == battle::LocationType::All; - position_mathced |= (type == battle::LocationType::All) && (tile.buildable == battle::LocationType::Melee || + bool position_matched = tile.buildable == type || tile.buildable == battle::LocationType::All; + position_matched |= (type == battle::LocationType::All) && (tile.buildable == battle::LocationType::Melee || tile.buildable == battle::LocationType::Ranged); - if (position_mathced && + if (position_matched && tile.key != TilePack::TileKey::DeepSea && // 水上要先放板子才能放人,肉鸽里也没板子,那就当作不可放置 !m_used_tiles.contains(loc) && !m_blacklist_location.contains(loc)) { result.emplace_back(loc); diff --git a/src/MaaCore/Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp b/src/MaaCore/Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp index 0e482461b2..c05d1c875c 100644 --- a/src/MaaCore/Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp +++ b/src/MaaCore/Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp @@ -124,14 +124,14 @@ bool asst::RoguelikeShoppingTaskPlugin::_run() } if (!goods.roles.empty()) { - bool role_mathced = false; + bool role_matched = false; for (const auto& role : goods.roles) { if (map_roles_count[role] != 0) { - role_mathced = true; + role_matched = true; break; } } - if (!role_mathced) { + if (!role_matched) { Log.trace("Ready to buy", goods.name, ", but there is no such professional operator, skip"); continue; } @@ -143,14 +143,14 @@ bool asst::RoguelikeShoppingTaskPlugin::_run() continue; } if (!goods.roles.empty()) { - bool role_mathced = false; + bool role_matched = false; for (const auto& role : goods.roles) { if (map_wait_promotion[role] != 0) { - role_mathced = true; + role_matched = true; break; } } - if (!role_mathced) { + if (!role_matched) { Log.trace("Ready to buy", goods.name, ", but there is no one waiting for promotion, skip"); continue; }