fix: 修复肉鸽存款余额ocr错误

fix #8261
This commit is contained in:
status102
2024-02-06 17:09:39 +08:00
parent a19fcd6624
commit 42d414206e
2 changed files with 13 additions and 0 deletions

View File

@@ -12752,6 +12752,12 @@
335,
150,
60
],
"ocrReplace": [
[
">",
""
]
]
},
"Roguelike@StageTraderInvest-Count-Error": {

View File

@@ -113,6 +113,13 @@ std::optional<int> asst::RoguelikeInvestTaskPlugin::ocr_current_count(const auto
{
RegionOCRer ocr(img);
ocr.set_task_info(task_name);
const auto& number_replace = Task.get<OcrTaskInfo>("NumberOcrReplace")->replace_map;
auto task_replace = Task.get<OcrTaskInfo>(task_name)->replace_map;
auto merge_map = std::vector(number_replace);
ranges::copy(task_replace, std::back_inserter(merge_map));
ocr.set_replace(merge_map);
if (!ocr.analyze()) {
Log.error(__FUNCTION__, "unable to analyze current investment count.");
return std::nullopt;