docs(issues): #5 — VitalsPanel stam/mana null until LocalPlayerState lands

Filed as the one explicit post-D.2a follow-up. VitalsVM returns float?
null for Stamina/Mana because absolute values only arrive in
PlayerDescription (0x0013) today and we parse-then-discard. A small
LocalPlayerState Core class that retains the parsed fields unblocks
two more progress bars in the existing Vitals window — no new wire
work needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-04-25 00:44:17 +02:00
parent 55aaca7a14
commit 4d1b8b8aee

View file

@ -135,6 +135,29 @@ Copy this block when adding a new issue:
--- ---
## #5 — VitalsPanel stamina/mana bars always null (absolute values not stored)
**Status:** OPEN
**Severity:** LOW (cosmetic — HP bar already works; stam/mana would be a nice-to-have)
**Filed:** 2026-04-25
**Component:** ui / net / player-state
**Description:** Phase D.2a shipped `VitalsVM` with `StaminaPercent` / `ManaPercent` returning `float?` null. `VitalsPanel` already renders an HP progress bar from `CombatState.GetHealthPercent(localGuid)` because per-entity health is tracked from combat notifications. Stamina and mana are absolute values and only arrive in `PlayerDescription (0x0013)` — which we currently parse then discard. Result: the Vitals window shows HP only.
**Root cause / status:** We need a `LocalPlayerState` Core class (analogous to `CombatState` but scoped to the local player) that retains parsed `PlayerDescription` fields — at minimum: `CurrentStamina` + `MaxStamina` + `CurrentMana` + `MaxMana`. `AppraiseInfoParser.CreatureProfile` already has the shape for these values; we just don't persist them.
**Files:**
- `src/AcDream.Core.Net/Parsers/PlayerDescriptionParser.cs` — parses then discards (verify path)
- `src/AcDream.Core.Net/Parsers/AppraiseInfoParser.cs` — has `CreatureProfile` with absolute values
- `src/AcDream.UI.Abstractions/Panels/Vitals/VitalsVM.cs``StaminaPercent` / `ManaPercent` would divide `LocalPlayerState.Current*` by `Max*`
- `src/AcDream.App/Rendering/GameWindow.cs` — construct `LocalPlayerState`, hand to `VitalsVM`, wire into event dispatch
**Research:** none needed — wire-level field positions are already decoded in `PlayerDescriptionParser`.
**Acceptance:** With `ACDREAM_DEVTOOLS=1`, the Vitals window shows three progress bars (HP / Stamina / Mana) that update when the server sends `PlayerDescription` or any delta event (`UpdateHealth`, `UpdateStamina`, `UpdateMana`).
---
# Recently closed # Recently closed
*(none yet — move DONE items here with closed-date + commit SHA)* *(none yet — move DONE items here with closed-date + commit SHA)*