From 0cb8e2f75a7c501b654775b51b2a16322aa36543 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 13 Mar 2026 08:31:16 +0100 Subject: [PATCH] fix: refine mana panel item filtering --- static/script.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/static/script.js b/static/script.js index 48a8efd5..348cfcf9 100644 --- a/static/script.js +++ b/static/script.js @@ -1494,6 +1494,7 @@ function getManaTrackedItems(state) { const snapshotMs = Date.now(); return state.items .filter(item => (item.current_wielded_location || 0) > 0) + .filter(item => !isAetheriaItem(item)) .filter(item => { const spellInfo = item.spells; const hasSpellData = @@ -1579,6 +1580,11 @@ function isHandEquippedItem(item) { ); } +function isAetheriaItem(item) { + const mask = Number(item?.current_wielded_location || 0); + return mask === 268435456 || mask === 536870912 || mask === 1073741824; +} + function deriveManaStateFromCharacterStats(item, characterName) { const stats = characterStats[characterName]; const activeEnchantments = stats?.active_item_enchantments; @@ -1600,11 +1606,10 @@ function deriveManaStateFromCharacterStats(item, characterName) { return 'active'; } - if (isHandEquippedItem(item)) { - return 'not_active'; - } - if (!Array.isArray(activeEnchantments) || activeEnchantments.length === 0) { + if (isHandEquippedItem(item)) { + return 'not_active'; + } return allMatchedOnItem ? 'active' : item.mana_state; }