From c01203bf6ba685a6ba4dfec6421272d0aa1e6248 Mon Sep 17 00:00:00 2001 From: ShakeFlower Date: Mon, 2 Jun 2025 22:08:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=AD=A3=E6=96=B0=E9=81=93?= =?UTF-8?q?=E5=85=B7=E6=A0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/table/plugins.comment.js | 18 ++++++++++++------ project/plugins.js | 13 ++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/_server/table/plugins.comment.js b/_server/table/plugins.comment.js index 7867c07b..589e6d9d 100644 --- a/_server/table/plugins.comment.js +++ b/_server/table/plugins.comment.js @@ -81,18 +81,24 @@ var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_range": "typeof(thiseval)=='string' || thiseval==null", "_data": "自动拾取&清怪" }, - "newBackpackLook": { - "_leaf": true, - "_type": "textarea", - "_range": "typeof(thiseval)=='string' || thiseval==null", - "_data": "自绘道具栏" - }, "scrollingText": { "_leaf": true, "_type": "textarea", "_range": "typeof(thiseval)=='string' || thiseval==null", "_data": "接收&发送在线留言" }, + "uiBaseClass": { + "_leaf": true, + "_type": "textarea", + "_range": "typeof(thiseval)=='string' || thiseval==null", + "_data": "绘制基类" + }, + "newBackpackLook": { + "_leaf": true, + "_type": "textarea", + "_range": "typeof(thiseval)=='string' || thiseval==null", + "_data": "自绘道具栏" + }, "autoChangeEquip": { "_leaf": true, "_type": "textarea", diff --git a/project/plugins.js b/project/plugins.js index db71ecc2..3bb6642b 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -3148,10 +3148,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = const [px, py] = this.convertCoordinate(rawpx, rawpy); this.btnList.forEach((btn) => { if (btn.disable) return; - if (!btn.inRange || !(btn.inRange instanceof Function)) debugger; if (btn.inRange(px, py)) { if (btn instanceof ItemBox || btn instanceof EquipBox) { - if (btn.key !== this.index) this.focus(btn.key); + if (btn.key !== this.index || globalUI.selectType !== 'toolBox') this.focus(btn.key); } } }); @@ -3347,12 +3346,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } triggerItem() { - if (!core.canEquip(globalUI.itemId, true)) return; - core.loadEquip(globalUI.itemId); - this.updateItemList(); // 穿上装备会导致道具数量变化,并且需要重新锁定一次当前选中的道具 + const equip = globalUI.itemId; + if (!core.canEquip(equip, true)) return; + core.loadEquip(equip); + core.status.route.push("equip:" + equip); // 注意focus会导致itemId改变 + this.updateItemList(); // 穿上装备会导致道具数量变化,并且需要重新锁定当前选中的道具 this.focus(this.index); - - core.status.route.push("equip:" + globalUI.itemId); } }