fix:修复道具栏不隐藏装备的问题

This commit is contained in:
ShakeFlower 2025-05-12 16:57:50 +08:00
parent b3b46708fe
commit 72b41bb416
2 changed files with 19 additions and 17 deletions

View File

@ -1713,6 +1713,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
let list = Object.keys(core.status.hero.items[cls] || {});
if (!showHide) list = list.filter(function (id) {
const hideInfo = core.getFlag('hideInfo', {});
if (hideInfo[id]) return false;
return !core.material.items[id].hideInToolbox;
})
list = list.sort( /*function (id1, id2) { return core.material.items[id1].name <= core.material.items[id2].name ? -1 : 1 }*/);

View File

@ -2981,8 +2981,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
const selectedItem = getSelectedItem();
let canBatchUse = eval(core.material.items[selectedItem]?.canBatchUse);
if (!canBatchUse) return;
}
catch (error) {
} catch (error) {
console.error(error);
return;
}
@ -3054,7 +3053,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
}
if (!showHide) list = list.filter(function (id) {
const hideInfo = core.getFlag('hideInfo', {});
if (hideInfo.hasOwnProperty(id)) return !hideInfo[id];
if (hideInfo[id]) return false;
else return !core.material.items[id].hideInToolbox;
})
list = list.sort();
@ -3065,6 +3064,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
return this.uidata.getToolboxItems(cls, showHide);
}
if (!showHide) list = list.filter(function (id) {
const hideInfo = core.getFlag('hideInfo', {});
if (hideInfo[id]) return false;
return !core.material.items[id].hideInToolbox;
})
list = list.sort();
@ -3474,7 +3475,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.status.event.id = "toolbox";
core.initThisEventInfo();
var info = core.status.thisUIEventInfo;
var items = core.getToolboxItems("all", core.getFlag('showHideItem', false));
var items = core.getToolboxItems("all", core.hasFlag('showHideItem'));
setPageItems(1);
var index = items.indexOf(itemId) + 1;
info.page = Math.ceil(index / info.maxItem);
@ -3492,7 +3493,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.control._replayAction_equip = function (action) {
if (action.indexOf("equip:") != 0) return false;
var itemId = action.substring(6);
var items = core.getToolboxItems('equips');
var items = core.getToolboxItems('equips', core.hasFlag('showHideItem'));
var index = items.indexOf(itemId) + 1;
if (index < 1) {
core.removeFlag('__doNotCheckAutoEvents__');
@ -5105,4 +5106,3 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
}
}
}
/** @todo 自动存档相关 同步存档到本地/服务器增加存档确认 */