fix: refine mana panel layout and state display

Widen the inventory layout so the backpack column no longer crowds the paperdoll, and base mana active/inactive display on the live data currently available from inventory payloads.
This commit is contained in:
Erik 2026-03-13 07:32:57 +01:00
parent 4972b342d2
commit 84da2a8752
3 changed files with 14 additions and 9 deletions

View file

@ -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: