mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 10:00:44 +08:00
fix. 极端网络下公招不调整时间
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include "Resource.h"
|
||||
#include "OcrImageAnalyzer.h"
|
||||
#include "Controller.h"
|
||||
#include "RecruitImageAnalyzer.h"
|
||||
#include "ProcessTask.h"
|
||||
#include "RecruitTask.h"
|
||||
|
||||
@@ -131,9 +130,16 @@ bool asst::AutoRecruitTask::calc_and_recruit()
|
||||
return calc_and_recruit();
|
||||
}
|
||||
}
|
||||
// 如果时间没调整过,那 tag 十有八九也没选,重新试一次
|
||||
// 造成时间没调的原因可见: https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/300#issuecomment-1073287984
|
||||
if (check_time_unreduced()) {
|
||||
return calc_and_recruit();
|
||||
}
|
||||
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (std::find(m_confirm_level.cbegin(), m_confirm_level.cend(), maybe_level) != m_confirm_level.cend()) {
|
||||
if (!confirm()) {
|
||||
return false;
|
||||
@@ -144,6 +150,12 @@ bool asst::AutoRecruitTask::calc_and_recruit()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool asst::AutoRecruitTask::check_time_unreduced()
|
||||
{
|
||||
ProcessTask task(*this, {"RecruitCheckTimeUnreduced"});
|
||||
task.set_retry_times(1);
|
||||
return task.run();
|
||||
}
|
||||
|
||||
bool asst::AutoRecruitTask::check_recruit_home_page()
|
||||
{
|
||||
@@ -168,4 +180,4 @@ bool asst::AutoRecruitTask::refresh()
|
||||
{
|
||||
ProcessTask refresh_task(*this, { "RecruitRefresh" });
|
||||
return refresh_task.run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user