From 3a5ae62fe77e1dc1e83dfa4845eb4a43a4b64f79 Mon Sep 17 00:00:00 2001 From: ShakeFlower Date: Sun, 22 Feb 2026 08:48:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=98=BB=E5=87=BB?= =?UTF-8?q?=E5=92=8C=E8=87=AA=E5=8A=A8=E6=8B=BE=E5=8F=96=E7=9A=84=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E9=A1=BA=E5=BA=8F=E9=97=AE=E9=A2=98(=E5=A5=87?= =?UTF-8?q?=E6=80=AA=EF=BC=8C=E6=88=91=E6=98=8E=E6=98=8E=E6=88=91=E8=AE=B0?= =?UTF-8?q?=E5=BE=97=E6=88=91=E6=94=B9=E8=BF=87)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/control.js | 12 +++++++++--- project/plugins.js | 13 +------------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/libs/control.js b/libs/control.js index 1c3360b6..fa7e01f9 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1179,12 +1179,12 @@ control.prototype.checkBlock = function () { const adjacentChase = core.checkBlock_adjacentChase(); if (adjacentChase && adjacentChase.length > 0) core.push(actions, adjacentChase); } - else core.push(actions, { "type": "function", "async": true, "function": "function(){\ncore.checkBlock_adjacentChase(true);\n}" }); + else core.push(actions, { "type": "function", "async": true, "function": "function(){core.checkBlock_adjacentChase(true);}" }); } const chaseAction = this._checkBlock_chase(currChase); if (chaseAction.length > 0) core.push(actions, chaseAction); if (currChase && currChase.length > 0) { - core.push(actions, { "type": "function", "async": true, "function": "function(){\ncore.checkBlock_adjacentChase(true);\n}" }); + core.push(actions, { "type": "function", "async": true, "function": "function(){core.checkBlock_adjacentChase(true);}" }); } if (ambushAction.length > 0 && core.getLocalStorage("autoSaveAfterItem")) { core.push(actions, { "type": "autoSave" }); // 捕捉触发后自动存档 @@ -1192,7 +1192,13 @@ control.prototype.checkBlock = function () { const autoClear = core.plugin.autoClear; if (autoClear) { // 检查autoClear的存在性,防止接档出现bug - if (actions.length > 0) core.insertAction(actions, x, y, autoClear); + if (actions.length > 0) { + actions.push({ + "type": "function", "async": true, + "function": "function(){core.plugin.autoClear();core.doAction();}" + }); // 注意要放在事件队列最后。经测试放在insertAction回调当中仍有小概率先于阻击结算触发,原因不明 + core.insertAction(actions, x, y); + } else autoClear(); // 阻击结算后执行自动清怪 } else { diff --git a/project/plugins.js b/project/plugins.js index fda15696..4190912f 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -1924,18 +1924,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = */ const ctxName = 'autoClear'; - // 每走一步后自动拾取的判定要放在阻击结算之后 - - control.prototype.moveDirectly = function (destX, destY, ignoreSteps) { - const res = this.controldata.moveDirectly( - destX, - destY, - ignoreSteps - ); - core.control.updateCheckBlock(); - core.plugin.autoClear(); - return res; - }; + // 每走一步后自动拾取的判定要放在阻击结算之后,见libs,并不写在本插件当中 this.autoClear = auto;