mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
fix. 极端网络下公招不调整时间
This commit is contained in:
@@ -1732,6 +1732,17 @@
|
||||
"Stop"
|
||||
]
|
||||
},
|
||||
"RecruitCheckTimeUnreduced":{
|
||||
"action": "Stop",
|
||||
"template": "RecruitTimeReduce.png",
|
||||
"Doc": "检查时间是不是没有调整过",
|
||||
"roi": [
|
||||
350,
|
||||
150,
|
||||
200,
|
||||
150
|
||||
]
|
||||
},
|
||||
"RecruitConfirm": {
|
||||
"action": "clickSelf",
|
||||
"roi": [
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ namespace asst
|
||||
bool recruit_index(size_t index);
|
||||
bool calc_and_recruit();
|
||||
bool check_recruit_home_page();
|
||||
bool check_time_unreduced();
|
||||
bool recruit_now();
|
||||
bool confirm();
|
||||
bool refresh();
|
||||
|
||||
Reference in New Issue
Block a user