mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: 漏了.jpg
[skip changelog]
This commit is contained in:
@@ -182,7 +182,8 @@ using RoleCounts = std::unordered_map<Role, int>;
|
||||
|
||||
namespace copilot
|
||||
{
|
||||
using OperUsageGroups = std::unordered_map<std::string, std::vector<OperUsage>>;
|
||||
using OperUsageGroup = std::pair<std::string, std::vector<OperUsage>>;
|
||||
using OperUsageGroups = std::vector<OperUsageGroup>;
|
||||
|
||||
enum class ActionType
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ asst::battle::copilot::OperUsageGroups asst::CopilotConfig::parse_groups(const j
|
||||
oper.skill_times = oper_info.get("skill_times", 1); // 使用技能的次数,默认为 1,兼容曾经的作业
|
||||
oper_vec.emplace_back(std::move(oper));
|
||||
}
|
||||
groups.emplace(std::move(group_name), std::move(oper_vec));
|
||||
groups.emplace_back(OperUsageGroup { std::move(group_name), std::move(oper_vec) });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ asst::battle::copilot::OperUsageGroups asst::CopilotConfig::parse_groups(const j
|
||||
|
||||
// 单个干员的,干员名直接作为组名
|
||||
std::string group_name = oper.name;
|
||||
groups.emplace(std::move(group_name), std::vector { std::move(oper) });
|
||||
groups.emplace_back(OperUsageGroup { std::move(group_name), std::vector { std::move(oper) } });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "Utils/Ranges.hpp"
|
||||
|
||||
#include "Common/AsstBattleDef.h"
|
||||
#include "Config/GeneralConfig.h"
|
||||
#include "Config/Miscellaneous/BattleDataConfig.h"
|
||||
#include "Config/Miscellaneous/CopilotConfig.h"
|
||||
@@ -536,7 +537,7 @@ bool asst::BattleFormationTask::parse_formation()
|
||||
groups = &SSSCopilot.get_data().groups;
|
||||
}
|
||||
|
||||
for (const auto& [name, opers_vec] : *groups) {
|
||||
for (const auto& [name, opers_vec] : (*groups)) {
|
||||
if (opers_vec.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,14 @@ bool asst::BattleProcessTask::to_group()
|
||||
}
|
||||
|
||||
for (const auto& [group_name, oper_name] : m_oper_in_group) {
|
||||
auto& this_group = get_combat_data().groups[group_name];
|
||||
const auto& group_it = ranges::find_if(get_combat_data().groups, [&](const OperUsageGroup& pair) {
|
||||
return pair.first == group_name;
|
||||
});
|
||||
if (group_it == get_combat_data().groups.end()) {
|
||||
Log.warn(__FUNCTION__, "Group not found in combat data: ", group_name);
|
||||
continue;
|
||||
}
|
||||
const auto& this_group = group_it->second;
|
||||
// there is a build error on macOS
|
||||
// https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/3779762713/jobs/6425284487
|
||||
const std::string& oper_name_for_lambda = oper_name;
|
||||
|
||||
@@ -335,6 +335,8 @@ namespace MaaWpfGui.Main
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if (!_isRestartingWithoutArgs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user