mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
fix: 模板匹配任务,父类与子类模板数不相同时,使用最后一个阈值填充子类
This commit is contained in:
@@ -746,6 +746,8 @@ asst::TaskData::taskptr_t asst::TaskData::generate_match_task_info(std::string_v
|
||||
auto threshold_opt = task_json.find("threshold");
|
||||
if (!threshold_opt) {
|
||||
match_task_info_ptr->templ_thresholds = default_ptr->templ_thresholds;
|
||||
match_task_info_ptr->templ_thresholds.resize(match_task_info_ptr->templ_names.size(),
|
||||
default_ptr->templ_thresholds.back());
|
||||
}
|
||||
else if (threshold_opt->is_number()) {
|
||||
match_task_info_ptr->templ_thresholds = { threshold_opt->as_double() };
|
||||
|
||||
Reference in New Issue
Block a user