fix: 已在首页时不再触发翻至首页

This commit is contained in:
YueLengM
2024-09-04 23:40:49 +08:00
parent 29d052e34f
commit 1d0de2fcfa
2 changed files with 5 additions and 2 deletions

View File

@@ -97,7 +97,10 @@ void asst::RoguelikeFormationTaskPlugin::clear_and_reselect()
m_last_detected_oper_names.clear();
oper_list.clear();
swipe_to_first_page();
if (cur_page > 1) {
swipe_to_first_page();
}
while (analyze()) { // 返回true说明新增了干员可能还有下一页
ProcessTask(*this, { "RoguelikeRecruitOperListSlowlySwipeToTheRight" }).run();

View File

@@ -26,7 +26,7 @@ namespace asst
void swipe_to_first_page();
private:
int cur_page = 0;
int cur_page = 1;
int max_page = 0;
std::vector<RoguelikeFormationImageAnalyzer::FormationOper> oper_list;
std::vector<std::string> m_last_detected_oper_names; // 上一页识别到的干员