coa.5: refactor char display into guarded helpers; fix missed sites; restore login scan
release / release (push) Successful in 5s

- Extract AddCharacterTooltipHeader() + SetCharacterRowNameLevel() (Altoholic.lua);
  nil-guards centralized, callers in AccountSummary/Activity/BagUsage/Skills/tooltip.
- Fix sites the manual sweep missed: Skills.lua (row + skill ranks), Keys.lua x3,
  ShowClassIcons sort (Altoholic.lua:705, getters bypass their own or-0 via the wrapper).
- Restore login scan: OnPlayerAlive was ghost-only (fdcb25a) so iLvl never populated;
  now scans once per session. Removed dated DEBUG leftovers.
This commit is contained in:
2026-05-29 01:02:24 +02:00
parent 3fde42454e
commit 97e38d5c3d
10 changed files with 53 additions and 44 deletions
+6 -3
View File
@@ -167,10 +167,13 @@ function ScanInventory()
end
-- *** Event Handlers ***
local hasScannedThisSession
local function OnPlayerAlive()
-- print("DataStore_Inventory.lua") -- DEBUG 2025 07 21
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
-- CoA: scan once at login. PLAYER_ALIVE also fires on resurrect / Feign-Death cancel where gear
-- is unchanged, so skip those. (The previous "only when ghost" gate also skipped login, so iLvl
-- never populated and UNIT_INVENTORY_CHANGED was the only scan path - see commit fdcb25a.)
if hasScannedThisSession then return end
hasScannedThisSession = true
ScanInventory()
end