fix: 抗干扰值识别错误时卡树洞

#13572
This commit is contained in:
uye
2025-08-07 19:39:28 +08:00
parent 0db654b471
commit 3515ddf84d
2 changed files with 5 additions and 21 deletions

View File

@@ -102,9 +102,12 @@ std::optional<std::string> asst::RoguelikeStageEncounterTaskPlugin::handle_singl
analyzer.set_replace(Task.get<OcrTaskInfo>("NumberOcrReplace")->replace_map);
analyzer.set_use_char_model(true);
if (!analyzer.analyze()) {
return std::nullopt;
// return std::nullopt;
Log.error("Failed to recognize special value for event:", event.name);
}
else {
utils::chars_to_number(analyzer.get_result().front().text, special_val);
}
utils::chars_to_number(analyzer.get_result().front().text, special_val);
}
int choose_option = process_task(event, special_val);