fix(js): 修复有几率误判处于大厅 (#2769)

This commit is contained in:
Bread Grocery
2026-01-23 15:24:02 +08:00
committed by GitHub
parent 4d7b80fe3e
commit 9f5da9b1c9
4 changed files with 14 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -41,6 +41,15 @@ const clickToContinue = () => {
const findUidText = () => {
return findTextWithinBounds("UID", 1620, 1050, 300, 30, { contains: true });
};
//! 查找派蒙图标(判断处于奇域大世界/大厅)
const findPaimon = () => {
const iro = findImageWithinBounds("assets/UI_Icon_Paimon.png", 0, 0, 100, 100, {
useMask: true,
threshold: 0.8,
});
iro?.drawSelf("group_img");
return iro;
};
//! 查找元素视野按钮(判断处于大世界)
const findElementViewBtn = () => {
const iro = findImageWithinBounds("assets/UI_BtnIcon_ElementView.png", 0, 0, 500, 80, {
@@ -244,6 +253,7 @@ export {
findHeaderTitle,
findLeaveRoomBtn,
findManageStagesBtn,
findPaimon,
findPrepareMsg,
findSaveToDeletePos,
findSearchWonderlandBtn,

View File

@@ -7,13 +7,14 @@ import {
findElementViewBtn,
findGotTeyvatBtn,
findHeaderTitle,
findPaimon,
} from "../constants/regions.js";
//#region src/modules/lobby.ts
//! 判断是否处于奇域大厅
const isInLobby = () => findBeyondHallBtn() !== void 0;
const isInLobby = () => findPaimon() !== void 0 && findBeyondHallBtn() !== void 0;
//! 判断是否处于提瓦特大陆
const isInTeyvat = () => findElementViewBtn() !== void 0;
const isInTeyvat = () => findPaimon() !== void 0 && findElementViewBtn() !== void 0;
//! 退出大厅返回提瓦特大陆
const exitLobbyToTeyvat = async () => {
if (!userConfig.goToTeyvat) return;

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "千星奇域·每周经验刷取(回放通关版)",
"version": "0.1.11",
"version": "0.1.12",
"bgi_version": "0.54.0",
"description": "千星奇域·每周经验刷取(回放通关版)",
"authors": [