Skip to content

Commit 056206f

Browse files
authored
fix(js): 千星奇域删除存档按钮偏差,兼容直接结算的关卡 (#2468)
1 parent 0a13d06 commit 056206f

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

repo/js/MiliastraExperiencePlayback/main.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -807,9 +807,8 @@ var availablePlaybackFiles = () => {
807807
};
808808
var playStage = async (playbacks) => {
809809
//! 等待进入关卡
810-
await assertRegionAppearing(
811-
findStageEscBtn,
812-
"等待进入关卡超时",
810+
const ok = await waitForAction(
811+
() => findStageEscBtn() !== void 0 || findBottomBtnText("返回大厅") !== void 0,
813812
async () => {
814813
findBottomBtnText("开始游戏")?.click();
815814
findBottomBtnText("准备", true)?.click();
@@ -822,6 +821,12 @@ var playStage = async (playbacks) => {
822821
},
823822
{ maxAttempts: 60 }
824823
);
824+
if (!ok) throw new Error("进入关卡超时");
825+
//! 直接通关结算的关卡(不会进入关卡)
826+
if (findBottomBtnText("返回大厅")) {
827+
await exitStageToLobby();
828+
return;
829+
}
825830
//! 关闭游戏说明对话框
826831
await assertRegionDisappearing(
827832
findCloseDialog,
@@ -1026,7 +1031,7 @@ var deleteStageSave = async () => {
10261031
{ maxAttempts: 5 }
10271032
);
10281033
//! 计算勾选框位置并点击
1029-
const [cx, cy] = [(colPos.x * 2 + colPos.width) / 2, stagePos.y + 20];
1034+
const [cx, cy] = [(colPos.x * 2 + colPos.width) / 2, stagePos.y + 40];
10301035
await assertRegionAppearing(
10311036
() => findDeleteExternalSaveChecked(colPos.x),
10321037
"勾选要删除的局外存档超时",

repo/js/MiliastraExperiencePlayback/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 1,
33
"name": "千星奇域·每周经验刷取(回放通关版)",
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"bgi_version": "0.53.0",
66
"description": "千星奇域·每周经验刷取(回放通关版)",
77
"authors": [

0 commit comments

Comments
 (0)