mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
fix: 尝试修复外服肉鸽等级识别错误时不招人的问题
This commit is contained in:
@@ -31,7 +31,7 @@ bool asst::RoguelikeRecruitImageAnalyzer::analyze()
|
||||
int elite = match_elite(rect);
|
||||
int level = match_level(bbb_image, rect);
|
||||
|
||||
if (level == 0) {
|
||||
if (level < 0) {
|
||||
// 要么就是识别错了,要么这个干员希望不够,是灰色的
|
||||
// 主要用于忽略后面灰色的这种情况
|
||||
continue;
|
||||
@@ -92,7 +92,7 @@ int asst::RoguelikeRecruitImageAnalyzer::match_level(const cv::Mat& image, const
|
||||
analyzer.set_expansion(1);
|
||||
|
||||
if (!analyzer.analyze()) {
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
const std::string& level = analyzer.get_result().front().text;
|
||||
|
||||
@@ -142,8 +142,9 @@ bool asst::RoguelikeRecruitTaskPlugin::_run()
|
||||
priority = team_full_without_rookie ? recruit_info.recruit_priority_when_team_full
|
||||
: recruit_info.recruit_priority;
|
||||
}
|
||||
else if (oper_info.elite == 1 && oper_info.level >= 50) {
|
||||
else if (oper_info.elite == 1 && (oper_info.level >= 50 || oper_info.level == 0)) {
|
||||
// 精一50级以上
|
||||
// 等级是 0 一般是识别错了,多发生于外服,一般都是一错全错,先凑合着招一个吧,比不招人强 orz
|
||||
priority = team_full_without_rookie ? recruit_info.recruit_priority_when_team_full
|
||||
: recruit_info.recruit_priority;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user