Skip to content

Commit

Permalink
feat: 支持后勤终端用金币买角色碎片
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Sep 19, 2023
1 parent 56580a8 commit e8c1b59
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 2 deletions.
Binary file added assets/resource/image/Shop/EnterShopPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/resource/image/Shop/EnterSupplyPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
153 changes: 153 additions & 0 deletions assets/resource/pipeline/shop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"$schema": "../pipeline.schema.json",
"Shop": {
"next": [
"EnterSupplyPage",
"Sub_StartUp"
]
},
"EnterSupplyPage": {
"recognition": "TemplateMatch",
"template": "Shop/EnterSupplyPage.png",
"roi": [
1012,
389,
184,
140
],
"action": "Click",
"next": [
"EnterShopPage"
]
},
"EnterShopPage": {
"recognition": "TemplateMatch",
"template": "Shop/EnterShopPage.png",
"roi": [
157,
484,
213,
135
],
"action": "Click",
"next": [
"LogisticsTerminalBuyCharacterFragmentByGold",
"EnterShopPage"
]
},
"LogisticsTerminalBuyCharacterFragmentByGold": {
"recognition": "TemplateMatch",
"template": "Shop/LogisticsTerminalPage.png",
"roi": [
61,
131,
204,
134
],
"next": [
"LogisticsTerminalCharacterFragmentFlag",
"LogisticsTerminalNotCharacterFragmentFlag"
]
},
"LogisticsTerminalCharacterFragmentFlag": {
"recognition": "TemplateMatch",
"template": "Shop/LogisticsTerminalCharacterFragmentFlag.png",
"roi": [
232,
138,
139,
140
],
"next": [
"LogisticsTerminalBuyCharacterFragmentByGoldFlag",
"LogisticsTerminalNotBuyCharacterFragmentByGoldFlag"
]
},
"LogisticsTerminalNotCharacterFragmentFlag": {
"recognition": "TemplateMatch",
"inverse": true,
"template": "Shop/LogisticsTerminalCharacterFragmentFlag.png",
"roi": [
232,
138,
139,
140
],
"next": [
"stop"
]
},
"LogisticsTerminalBuyCharacterFragmentByGoldFlag": {
"recognition": "TemplateMatch",
"template": "Shop/LogisticsTerminalBuyCharacterFragmentByGoldFlag.png",
"roi": [
246,
373,
133,
136
],
"action": "Click",
"next": [
"LogisticsTerminalCharacterFragmentFlag",
"LogisticsTerminalBuyCharacterFragmentByGoldDo"
]
},
"LogisticsTerminalNotBuyCharacterFragmentByGoldFlag": {
"recognition": "TemplateMatch",
"inverse": true,
"template": "Shop/LogisticsTerminalBuyCharacterFragmentByGoldFlag.png",
"roi": [
246,
373,
133,
136
],
"action": "Click",
"next": [
"stop"
]
},
"LogisticsTerminalBuyCharacterFragmentByGoldDo": {
"recognition": "TemplateMatch",
"template": "Shop/LogisticsTerminalBuyCharacterFragmentByGoldFlag.png",
"roi": [
757,
496,
135,
140
],
"action": "Click",
"next": [
"LogisticsTerminalBuyCharacterFragmentByGoldSuccess",
"LogisticsTerminalBuyCharacterFragmentByGoldDone",
"LogisticsTerminalBuyCharacterFragmentByGoldDo"
]
},
"LogisticsTerminalBuyCharacterFragmentByGoldSuccess": {
"recognition": "OCR",
"text": "您已购买成功",
"roi": [
490,
288,
302,
140
],
"action": "Click",
"next": [
"stop"
]
},
"LogisticsTerminalBuyCharacterFragmentByGoldDone": {
"recognition": "TemplateMatch",
"template": "Shop/LogisticsTerminalBuyCharacterFragmentByGoldDone.png",
"roi": [
262,
372,
179,
135
],
"next": [
"stop"
]
}
}
8 changes: 6 additions & 2 deletions source/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string
<< " 1. Homeland\n"
" 2. MaterialEvent\n"
" 3. Armada\n"
" 4. Awards\n"
" 4. Shop\n"
" 5. Awards\n"
<< std::endl
<< "Please enter the task numbers to be executed: "
<< std::endl;
Expand Down Expand Up @@ -334,6 +335,9 @@ bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string
task_obj.type = "Armada";
break;
case 4:
task_obj.type = "Shop";
break;
case 5:
task_obj.type = "Awards";
break;

Expand Down Expand Up @@ -394,7 +398,7 @@ void save_config(const std::string& adb, const std::string& adb_address, const i
}

config["tasks"] = std::move(tasks_array);
config["tasks_Doc"] = "要执行的任务 Homeland, MaterialEvent, Armada, Awards";
config["tasks_Doc"] = "要执行的任务 Homeland, MaterialEvent, Armada, Shop, Awards";

json::value after_task;
after_task["enabled"] = false;
Expand Down

0 comments on commit e8c1b59

Please sign in to comment.