File Details
v12.0.18
- R
- Apr 25, 2026
- 4.87 MB
- 818
- 12.0.5
- Retail
File Name
v12.0.18.zip
Supported Versions
- 12.0.5
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 updb.relativeToin_Gor fall back toUIParent" block was inlined twice — once inCreateDisplay, once inApplyDisplaySettings. 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, width270 - 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-UIParentparent 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_DEFAULTSandcoreState=columns aligned to the wider canonical position so shared keys land in the same column position as NPA.
Lock / Unlock
SetLockStatenow adopts NPA's pattern:coreState.unlockedis 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 ifSetLockStatewas ever called pre-display. The frame border (NHA-specific) and lock-button text update remain inside theif fguard.- 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 tomod:Debug(db)if the active spec module provides one.- The contract documentation now lists
Debugas 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
_panelWasOpentracking pattern so the WoW Settings panel closes cleanly when reopened from the dropdown. ToggleTest()now respectsIsFullyImplemented()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 endremoved from the event handler — the precedingif not mod then return endalready covers it.
Sound fallback
GetSoundPathnow falls back to the bundledRobotBlipsound 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
GetSpecIDcollapsed. - 5-line
InitGlowHooksexplanation 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.
aoHheight 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 = Xexposures that no spec file uses:FONTS_PATH,MEDIA_PATH,UI_FONT,GetSoundPath,SOUND_NAMES,MergeDefaults,InvalidateGroupUnitsCache,ApplyDisplaySettings. Internal locals retained. f:EnableMouse(false)inCreateDisplay(immediately overridden byApplyDisplaySettings).- 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 existingEvaluateFrameGlow,RefreshGlows,ClearAllGlows,OnEvent,BuildAlertOptions,noTest,noSound, etc. - Mention of
specIndexremoved —specIDis the only required identifier.
Section banner
-- Spec Helpersmatches NPA's banner.

