fix: 修复自动编队超过10人时不选人的问题

This commit is contained in:
MistEO
2023-06-20 20:56:31 +08:00
parent ac0a509d28
commit e76a8cb7e0
2 changed files with 9 additions and 7 deletions

View File

@@ -6470,7 +6470,7 @@
107,
20
],
"postDelay": 100
"postDelay": 200
},
"BattleQuickFormationSkill1": {
"algorithm": "JustReturn",
@@ -12562,4 +12562,4 @@
],
"postDelay": 2000
}
}
}

View File

@@ -184,13 +184,14 @@ bool asst::BattleFormationTask::select_opers_in_cur_page(std::vector<OperGroup>&
Task.get("BattleQuickFormationSkill3")->specific_rect,
};
if (opers_result.empty() || m_last_oper_name == opers_result.back().text) {
Log.info("last oper name is same as current, skip");
return false;
if (!opers_result.empty()) {
if (m_last_oper_name == opers_result.back().text) {
Log.info("last oper name is same as current, skip");
return false;
}
m_last_oper_name = opers_result.back().text;
}
m_last_oper_name = opers_result.back().text;
int delay = Task.get("BattleQuickFormationOCR")->post_delay;
int skill = 1;
@@ -218,6 +219,7 @@ bool asst::BattleFormationTask::select_opers_in_cur_page(std::vector<OperGroup>&
sleep(delay);
if (1 <= skill && skill <= 3) {
ctrler()->click(SkillRectArray.at(skill - 1ULL));
sleep(delay);
}
groups.erase(iter);