diff --git a/inventory-service/main.py b/inventory-service/main.py index 19335639..14e11ad1 100644 --- a/inventory-service/main.py +++ b/inventory-service/main.py @@ -1139,6 +1139,7 @@ def get_mana_tracker_info(item_data: Dict[str, Any]) -> Dict[str, Any]: spell_ids = item_data.get("Spells", []) or [] active_spells = item_data.get("ActiveSpells", []) or [] active_item_enchantments = item_data.get("ActiveItemEnchantments", []) or [] + has_active_spell_context = bool(active_spells) or bool(active_item_enchantments) mana_rate_of_change = None if "5" in double_values: @@ -1226,10 +1227,14 @@ def get_mana_tracker_info(item_data: Dict[str, Any]) -> Dict[str, Any]: mana_state = "unknown" elif current_mana <= 0: mana_state = "not_active" - elif has_inactive_spell: - mana_state = "not_active" - else: + elif mana_rate_of_change is not None: + mana_state = "active" if mana_rate_of_change < 0 else "not_active" + elif has_active_spell_context: + mana_state = "not_active" if has_inactive_spell else "active" + elif actionable_spells: mana_state = "active" + else: + mana_state = "unknown" seconds_per_burn = None if mana_rate_of_change is not None and mana_rate_of_change < 0: diff --git a/static/script.js b/static/script.js index 7a2b5c01..45102acd 100644 --- a/static/script.js +++ b/static/script.js @@ -1629,7 +1629,7 @@ function showInventoryWindow(name) { loading.textContent = 'Loading inventory...'; content.appendChild(loading); - win.style.width = '540px'; + win.style.width = '572px'; win.style.height = '520px'; const invContent = document.createElement('div'); diff --git a/static/style.css b/static/style.css index 303e7c9e..663dc680 100644 --- a/static/style.css +++ b/static/style.css @@ -735,7 +735,7 @@ body.noselect, body.noselect * { position: fixed; top: 100px; left: 400px; - width: 548px; + width: 572px; height: 520px; background: rgba(20, 20, 20, 0.92); backdrop-filter: blur(2px); @@ -762,7 +762,7 @@ body.noselect, body.noselect * { display: flex; justify-content: flex-start; min-height: 264px; - gap: 10px; + gap: 14px; } .inv-equipment-grid { @@ -815,7 +815,7 @@ body.noselect, body.noselect * { gap: 2px; overflow: visible; flex-shrink: 0; - margin-right: 2px; + margin-right: 6px; } .inv-burden-bar { @@ -2432,13 +2432,13 @@ table.ts-allegiance td:first-child { border: 2px solid #8a7a44 !important; background: #0e0c08 !important; resize: none !important; - width: 548px !important; + width: 572px !important; min-height: 520px !important; } .inv-top-section { justify-content: flex-start !important; - gap: 10px !important; + gap: 14px !important; } .inv-bottom-section {