Nem: Healer Alerts

Never miss the window again. Big, readable on-screen alerts and raid-frame glows the moment a HoT falls off, a cooldown comes back up, a proc lights up, or your coverage drops, with voice cues so you hear it without taking your eyes off the fight.

File Details

v12.0.18

  • R
  • Apr 25, 2026
  • 4.87 MB
  • 822
  • 12.0.5+1
  • Retail

File Name

v12.0.18.zip

Supported Versions

  • 12.0.5
  • 12.0.1

# v12.0.18 (2026-04-25) ## Core Refactor — NHA / NPA Alignment A structural refactor of the core engine to bring **Nem: Healer Alerts** and its sister addon **Nem: Pet Alerts** into a near-identical layout. No gameplay behavior changes — same alerts, same triggers, same sounds, same display, same proc glows. ### Why The two addons grew side-by-side and accumulated stylistic drift — different section ordering, different spec-matching strategies, different debouncing strategies, dead code on both sides. Future bug fixes and feature work are cheaper if both cores look the same. Both files now share the same 23 sections in the same order, with feature-specific divergences (glow infrastructure, group-units cache, multi-alert OnUpdate display, timer FontStrings, frame border) confined to clearly-bounded blocks. ### Spec matching simplified `FindActiveModule` previously did a primary check on `mod.specIndex` with `mod.specID` as a fallback. The new code uses a single check: `mod.specID == NHA.GetSpecID()`, where `GetSpecID` is the same secret-value-safe helper NPA uses. All seven healer spec files already carried `specID` and were unaffected; the now-vestigial `specIndex` field is ignored. ### Database access — `self.db` design Every database read and write inside a `:` method now uses `self.db` instead of `NHA.db`. This is purely stylistic — `self == NHA` inside any `function NHA:foo()` — but it makes the database access pattern uniform with NPA. Affected sites: 7 `NHA.db.enabled` references in the slash command handler, plus 2 `local _db = NHA.db` captures in the Target/Focus aura hooks inside `InitGlowHooks`. The `NHA.db` form remains in non-method local functions (`CreateDisplay`, `BuildAlertRows`, `ApplyDisplaySettings`, `Evaluate`, etc.) where there is no `self` in scope. ### Helper extraction - `ResolveRelativeFrame(db)` extracted as a shared helper. Previously the 4-line "look up `db.relativeTo` in `_G` or fall back to `UIParent`" block was inlined twice — once in `CreateDisplay`, once in `ApplyDisplaySettings`. Now both call sites use the helper. ### Panel alignment with NPA The options panel previously used widths that drifted between the two addons. Both now use identical canonical values: - Panel width `PW: 664 → 668` - Content width offset `CPW: CW → CW - 4` - Display slider X position: `340 → 358`, width `270` - Sound dropdown anchor offset: `306 → 324` - Drag-stop saved fields now write the full 5-tuple including `relativeTo`, matching NPA. Previously dropped that field, which prevented the frame from anchoring to a non-`UIParent` parent across reloads if a future feature needed it. - Restore button structured as one-property-per-line column form matching NPA's style. Button positioning variables renamed (`btnSpacing`, `totalBtnW`, `btnStartX`). - `CORE_DEFAULTS` and `coreState` `=` columns aligned to the wider canonical position so shared keys land in the same column position as NPA. ### Lock / Unlock - `SetLockState` now adopts NPA's pattern: `coreState.unlocked` is updated unconditionally first, then the frame is touched only if it exists. Previously bailed early if no display, which meant the state flag and the chat message would silently not fire if `SetLockState` was ever called pre-display. The frame border (NHA-specific) and lock-button text update remain inside the `if f` guard. - Lock/unlock chat message now uses colored formatting: `Frame |cff00ff00unlocked|r — drag to reposition.` / `Frame |cffff4444locked|r.` ### `f:SetSize` - Display frame size remains `(900, 160)` (unchanged). NPA was bumped from `(900, 150)` to match this canonical value. ### New: Debug command - `/nha debug` — prints class, active module, enabled state, group/raid status, LibCustomGlow status, glow-hook installation state, and then delegates to `mod:Debug(db)` if the active spec module provides one. - The contract documentation now lists `Debug` as an optional module hook. ### Slash command unification - Command order, help text, and colored status strings now match NPA's format exactly. - The addon-compartment handler now uses the `_panelWasOpen` tracking pattern so the WoW Settings panel closes cleanly when reopened from the dropdown. - `ToggleTest()` now respects `IsFullyImplemented()` and silently no-ops if no spec is active, instead of letting the test ticker spin against a missing module. - Redundant `if not IsFullyImplemented() then return end` removed from the event handler — the preceding `if not mod then return end` already covers it. ### Sound fallback - `GetSoundPath` now falls back to the bundled `RobotBlip` sound when the requested sound is missing or LibSharedMedia returns nothing. Previously it returned nil, which silently dropped the alert sound. An enabled sound now always plays something. ### Comment cleanup - File header capabilities list collapsed to a 5-line summary pointing at the spec contract. - 80-line spec module contract block compressed to ~25 lines documenting the table fields without prose paragraphs. - Verbose secret-value commentary in `GetSpecID` collapsed. - 5-line `InitGlowHooks` explanation block collapsed to 2 lines (the "compact frames inaccessible since 12.0.5" note). - Section banners on tiny utility functions removed where redundant. - Many redundant single-line comments above self-explanatory code dropped. - `aoH` height calculation collapsed from a labeled stack of components into a single readable line. ### Removed - Unused constant `MAX_ALERT_ROWS = 6` (set, never read). - Unused upvalue `local UnitExists = UnitExists` (no caller in NHA core). - 8 `NHA.X = X` exposures that no spec file uses: `FONTS_PATH`, `MEDIA_PATH`, `UI_FONT`, `GetSoundPath`, `SOUND_NAMES`, `MergeDefaults`, `InvalidateGroupUnitsCache`, `ApplyDisplaySettings`. Internal locals retained. - `f:EnableMouse(false)` in `CreateDisplay` (immediately overridden by `ApplyDisplaySettings`). - Login chat message (`"Loaded. Type /nha for options."`) — for parity with NPA, which has no login greeting. The addon still loads silently and you can check status with `/nha status`. - Spec-switch chat messages (`"Alerts paused"` / `"Alerts active"`) — same parity reason. ### Spec module contract - Contract comment now documents the full set of optional hooks: `NeedsTicker`, `Debug`, plus the existing `EvaluateFrameGlow`, `RefreshGlows`, `ClearAllGlows`, `OnEvent`, `BuildAlertOptions`, `noTest`, `noSound`, etc. - Mention of `specIndex` removed — `specID` is the only required identifier. ### Section banner - `-- Spec Helpers` matches NPA's banner. ---