Skip to content

Commit

Permalink
fix: 修复部分任务小错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Jul 22, 2023
1 parent fd8f563 commit d665a21
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
13 changes: 12 additions & 1 deletion assets/resource/pipeline/awards.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"next": [
"Sub_CollectDailyAwards",
"Sub_ObtainedDailyAwards",
"WeeklyAwardsBadge"
"WeeklyAwardsBadge",
"DailyAwardsPageFlag"
]
},
"Sub_CollectDailyAwards": {
Expand Down Expand Up @@ -132,5 +133,15 @@
"Sub_BackButton",
"HomeFlag"
]
},
"DailyAwardsPageFlag": {
"recognition": "TemplateMatch",
"template": "template/Awards/DailyAwardsPageFlag.png",
"roi": [
458,
0,
138,
136
]
}
}
10 changes: 3 additions & 7 deletions assets/resource/pipeline/startup.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@
"Download",
"GameLoading",
"BluePochLogo",
"Disclaimer"
],
"timeout": 5000,
"timeout_next": [
"Sub_Start1999"
"Disclaimer",
"Stop"
]
},
"Sub_Start1999": {
"is_sub": true,
"Start1999": {
"action": "StartApp",
"package": "com.shenlan.m.reverse1999/com.ssgame.mobile.gamesdk.frame.AppStartUpActivity"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions source/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ int main(int argc, char** argv)

save_config(adb, adb_address, tasks, control_type);

MaaTaskId task_id = 0;
for (const std::string& task : tasks) {
auto task_id = MaaPostTask(maa_handle, task.c_str(), MaaTaskParam_Empty);
MaaTaskWait(maa_handle, task_id);
task_id = MaaPostTask(maa_handle, task.c_str(), MaaTaskParam_Empty);
}
MaaTaskWait(maa_handle, task_id);

destroy();

Expand All @@ -109,6 +110,8 @@ bool proc_argv(int argc, char** argv, std::string& adb, std::string& adb_address
int key = 1;
int screencap = 3;

tasks.clear();

if (argc >= 3) {
adb = argv[1];
adb_address = argv[2];
Expand Down Expand Up @@ -154,6 +157,9 @@ bool proc_argv(int argc, char** argv, std::string& adb, std::string& adb_address
while (iss >> task_id) {
task_ids.emplace_back(task_id);
}

tasks = { "Start1999" };

for (auto id : task_ids) {
switch (id) {
case 1:
Expand Down Expand Up @@ -186,7 +192,7 @@ void save_config(const std::string& adb, const std::string& adb_address, const s
config["adb_address"] = adb_address;
config["adb_address_Doc"] = "adb 连接地址,例如 127.0.0.1:5555";
config["tasks"] = json::array(tasks);
config["tasks_Doc"] = "要执行的任务Wilderness, Psychube, Awards";
config["tasks_Doc"] = "要执行的任务 Start1999, Wilderness, Psychube, Awards";
config["touch"] = (ctrl_type & MaaAdbControllerType_Touch_Mask) >> 0;
config["touch_Doc"] = "点击方式:1: Adb, 2: MiniTouch, 3: MaaTouch";
// config["key"] = key;
Expand Down

0 comments on commit d665a21

Please sign in to comment.