mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-23 08:06:55 +00:00
50d06f2e7a
- Switch the four GUID reads in OnDataChanged from plate.parent:GetName(1) (SuperWoW idiom) to plate.cachedGuid (set by NAME_PLATE_UNIT_ADDED via UnitGUID(token)). Move the initial OnDataChanged call out of OnConfigChange's CREATE path so it runs after UNIT_ADDED has populated cachedGuid; re-add it explicitly in the user-config-change loop. - Reject GetUnitField's health/maxHealth when maxHealth == 100 — the engine writes (hp_percent, 100) into UnitFields for non-detailed units (UPDATE_PARTIAL packets carry percent only). Without this guard, Nampower's raw field read returns the percent and the nameplate displays "5 / 100" as if it were real HP. Mirrors libhealth's heuristic so we fall through to its estimator instead. - New config: nametextpos (LEFT/CENTER/RIGHT, defaults to CENTER). Decouple the bar's anchor from the name so the name's JustifyH can shift left/right without dragging the bar with it.