mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
fix: 再次修复干员识别干员名替换不生效问题
This commit is contained in:
@@ -68,17 +68,15 @@ bool asst::OperBoxImageAnalyzer::opers_analyze()
|
||||
const auto& all_opers = BattleData.get_all_oper_names();
|
||||
oper_name_analyzer.set_required(std::vector(all_opers.begin(), all_opers.end()));
|
||||
|
||||
const auto& replace_task = Task.get<OcrTaskInfo>("CharsNameOcrReplace");
|
||||
oper_name_analyzer.set_replace(replace_task->replace_map, replace_task->replace_full);
|
||||
|
||||
TemplDetOCRer::ResultsVec results;
|
||||
|
||||
Rect roi_top = Task.get("OperBoxFlagRoleTopROI")->roi;
|
||||
Rect roi_bottom = Task.get("OperBoxFlagRoleBottomROI")->roi;
|
||||
|
||||
const auto& replace_task = Task.get<OcrTaskInfo>("CharsNameOcrReplace");
|
||||
|
||||
for (int i = 1; i < 10; ++i) {
|
||||
oper_name_analyzer.set_task_info("OperBoxFlagRole" + std::to_string(i), "OperBoxNameOCR");
|
||||
|
||||
oper_name_analyzer.set_replace(replace_task->replace_map, replace_task->replace_full);
|
||||
oper_name_analyzer.set_roi(roi_top);
|
||||
auto top_result_opt = oper_name_analyzer.analyze();
|
||||
if (top_result_opt) {
|
||||
|
||||
Reference in New Issue
Block a user