fix: 悬停错位

This commit is contained in:
unanmed 2024-11-20 19:49:13 +08:00
parent 3c5a310146
commit 003369bed1
4 changed files with 12 additions and 8 deletions

View File

@ -30,5 +30,7 @@
"觉得卡顿?可以去试着设置里面关闭一些特性!",
"从第二章开始怪物负伤害量不会超过其生命的1/4",
"生命回复不会超过防御的十分之一",
"不想看小贴士?设置里面可以关掉!"
"不想看小贴士?设置里面可以关掉!",
"不小心进入了追猎范围?读取自动存档撤回到进入前吧!",
"不小心进入了电摇嘲讽范围?读取自动存档撤回到进入前吧!"
]

View File

@ -161,7 +161,7 @@ class GameListener extends EventEmitter<ListenerEvent> {
x: px,
y: py,
size
} = core.actions._getClickLoc(e.clientX, e.clientY);
} = core.actions._getClickLoc(e.offsetX, e.offsetY);
const [bx, by] = getBlockLoc(px, py, size);
const blocks = core.getMapBlocksObj();
if (this.mouseX !== bx || this.mouseY !== by) {
@ -207,7 +207,7 @@ class GameListener extends EventEmitter<ListenerEvent> {
x: px,
y: py,
size
} = core.actions._getClickLoc(e.clientX, e.clientY);
} = core.actions._getClickLoc(e.offsetX, e.offsetY);
const [bx, by] = getBlockLoc(px, py, size);
const blocks = core.getMapBlocksObj();
const block = blocks[`${bx},${by}`];

View File

@ -218,10 +218,11 @@ export function init() {
(core.flags.flyNearStair && !core.nearStair())
)
return false;
if (core.flyTo(floorId, core.replay)) {
tipAndWait(`飞往:${floorId}`, 1000);
return true;
}
return false;
tipAndWait(`飞往:${floorId}`, 1000).then(() => {
if (!core.flyTo(floorId, core.replay)) {
core.control._replay_error(action);
}
});
return true;
});
}

View File

@ -1165,6 +1165,7 @@ interface Control {
_moveAction_popAutomaticRoute(): void;
_replay_SL(): void;
_replay_viewMap(): void;
_replay_error(action: string): void;
}
declare const control: new () => Control;