mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: 保存招募券结束后等待确认招募按钮消失 (#14773)
* fix: 保存招募券结束后加点延时 * fix: 增加确认招募按钮消失的等待逻辑 * fix: 添加确认按钮未消失时继续招募流程
This commit is contained in:
@@ -108,7 +108,21 @@ bool asst::RoguelikeRecruitTaskPlugin::_run()
|
||||
if (theme == RoguelikeTheme::JieGarden && mode == RoguelikeMode::FindPlaytime && !m_initail_recruit) {
|
||||
bool ret = ProcessTask(*this, { "JieGarden@Roguelike@ReserveRecruitmentVoucher" }).run();
|
||||
if (ret) {
|
||||
return true;
|
||||
// 判断当前界面是否存在尚未消失的确认招募按钮,等待其消失
|
||||
Matcher analyzer;
|
||||
analyzer.set_task_info("JieGarden@Roguelike@ChooseOperConfirm");
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
analyzer.set_image(ctrler()->get_image());
|
||||
if (analyzer.analyze().has_value()) {
|
||||
Log.info(__FUNCTION__, "| Waiting for confirm button to disappear...");
|
||||
sleep(200);
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// 没有消失的话就继续招募流程
|
||||
Log.warn(__FUNCTION__, "| Confirm button did not disappear in time, continue recruitment process.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user