From 4d1b8b8aee89ed6c1931edb38effbf570a726f04 Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 25 Apr 2026 00:44:17 +0200 Subject: [PATCH] =?UTF-8?q?docs(issues):=20#5=20=E2=80=94=20VitalsPanel=20?= =?UTF-8?q?stam/mana=20null=20until=20LocalPlayerState=20lands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- docs/ISSUES.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/ISSUES.md b/docs/ISSUES.md index 38d52ec..5f2c01a 100644 --- a/docs/ISSUES.md +++ b/docs/ISSUES.md @@ -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 *(none yet — move DONE items here with closed-date + commit SHA)*