mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 10:10:45 +08:00
fix.完善收取信用后的逻辑
This commit is contained in:
@@ -93,7 +93,9 @@
|
||||
},
|
||||
"EndOfAction": {
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [ "行动结束" ],
|
||||
"text": [
|
||||
"行动结束"
|
||||
],
|
||||
"preDelay": 3000,
|
||||
"action": "printWindow",
|
||||
"next": [
|
||||
@@ -254,7 +256,9 @@
|
||||
},
|
||||
"VisitNextOcr": {
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [ "访问下位" ],
|
||||
"text": [
|
||||
"访问下位"
|
||||
],
|
||||
"action": "clickSelf",
|
||||
"rearDelay": 3000,
|
||||
"identifyArea": [
|
||||
@@ -311,7 +315,9 @@
|
||||
},
|
||||
"CreditStoreOcr": {
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [ "信用交易所" ],
|
||||
"text": [
|
||||
"信用交易所"
|
||||
],
|
||||
"rearDelay": 1000,
|
||||
"action": "clickSelf",
|
||||
"next": [
|
||||
@@ -322,13 +328,23 @@
|
||||
"CollectCredit": {
|
||||
"template": "CollectCredit.png",
|
||||
"action": "clickSelf",
|
||||
"next": [
|
||||
"ColseCollectCredit"
|
||||
]
|
||||
},
|
||||
"ColseCollectCredit": {
|
||||
"algorithm": "justReturn",
|
||||
"action": "clickRand",
|
||||
"next": [
|
||||
"Stop"
|
||||
]
|
||||
},
|
||||
"VisitLimited": {
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [ "今日参与", "已达上限" ],
|
||||
"text": [
|
||||
"今日参与",
|
||||
"已达上限"
|
||||
],
|
||||
"action": "doNothing",
|
||||
"identifyArea": [
|
||||
900,
|
||||
@@ -362,7 +378,12 @@
|
||||
"template": "RecruitTimeReduce.png",
|
||||
"templThreshold": 0.89,
|
||||
"action": "clickRect",
|
||||
"specificArea": [ 391, 279, 129, 44 ],
|
||||
"specificArea": [
|
||||
391,
|
||||
279,
|
||||
129,
|
||||
44
|
||||
],
|
||||
"next": [
|
||||
"Stop"
|
||||
]
|
||||
@@ -530,7 +551,11 @@
|
||||
},
|
||||
"InfrastReward": {
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [ "可收获", "订单交付", "信赖" ],
|
||||
"text": [
|
||||
"可收获",
|
||||
"订单交付",
|
||||
"信赖"
|
||||
],
|
||||
"rearDelay": 1000,
|
||||
"action": "clickSelf",
|
||||
"identifyArea": [
|
||||
@@ -609,7 +634,6 @@
|
||||
"template": "UavAssist-Trade.png",
|
||||
"action": "stop",
|
||||
"cache": false,
|
||||
"next": [
|
||||
]
|
||||
"next": []
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,9 @@ bool asst::CreditShoppingTask::run()
|
||||
}
|
||||
|
||||
for (const Rect& commodity_rect : need_to_buy) {
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
m_controller_ptr->click(commodity_rect);
|
||||
sleep(1000);
|
||||
image = m_controller_ptr->get_image();
|
||||
@@ -91,7 +94,9 @@ bool asst::CreditShoppingTask::run()
|
||||
}
|
||||
buy_it_rect = buy_it_res.rect;
|
||||
}
|
||||
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
m_controller_ptr->click(buy_it_rect);
|
||||
sleep(1000);
|
||||
// 识别是否信用不足无法购买
|
||||
|
||||
@@ -73,6 +73,12 @@ bool ProcessTask::run()
|
||||
case ProcessTaskAction::ClickSelf:
|
||||
exec_click_task(rect);
|
||||
break;
|
||||
case ProcessTaskAction::ClickRand:
|
||||
{
|
||||
static const Rect full_rect(0, 0, Configer::WindowWidthDefault - 1, Configer::WindowHeightDefault - 1);
|
||||
exec_click_task(full_rect);
|
||||
|
||||
} break;
|
||||
case ProcessTaskAction::SwipeToTheLeft:
|
||||
case ProcessTaskAction::SwipeToTheRight:
|
||||
exec_swipe_task(task_info_ptr->action);
|
||||
|
||||
Reference in New Issue
Block a user