# v12.0.1.3 (2026-04-02)
## Performance

### CPU optimization — large group content
Significant reduction in CPU usage in raid and battleground environments:

- **`CompactUnitFrame_UtilSetBuff` pre-check** — hook now fast-rejects untracked frames with non-player auras before calling `EvaluateFrameGlow`. In a 40-man raid this fires hundreds of times per second; the pre-check eliminates the vast majority of calls at near-zero cost
- **`EvaluateFrameGlow` fast-reject** — untracked frames with nil, secret, or non-player auras now return immediately without touching any tables
- **Cached group unit list** — `GetGroupUnits()` now rebuilds only on `GROUP_ROSTER_UPDATE`, `PLAYER_ENTERING_WORLD`, `PLAYER_TARGET_CHANGED`, and `PLAYER_FOCUS_CHANGED`. Previously allocated a new 40-entry table on every `FullScanForLB` call
- **`UNIT_AURA` debounce** — player aura events now debounced to 0.1s. In a BG, player aura changes (procs, HoTs, debuffs) were firing dozens of Evaluate calls per second
- **`GROUP_ROSTER_UPDATE` debounce** — fires 5–10 times per player join. A 0.5s debounce collapses the entire join burst into a single Evaluate, eliminating heavy stuttering during the initial fill of a 40-man raid
- **Coalescing `ScheduleEvaluate` helper** — multiple events firing in the same frame each previously queued their own `C_Timer.After(0, Evaluate)`. A single pending flag now collapses them into one
- **`ShowProcGlow` table allocation** — eliminated two heap allocations per glow activation by reusing a module-level cached options table
- **Duplicate `issecretvalue` check removed** — was being called twice on the same value in `EvaluateFrameGlow`

## Bug Fixes

- **SOTF alert stuck in combat when proc expires naturally** — if the Soul of the Forest proc ran out without casting Rejuv or Regrowth, `sotfProcPending` stayed `true` indefinitely. Alert now clears correctly when `sotfExpire` passes
- **LB icon glow not firing when targeting an enemy** — compact raid frames only fire `CompactUnitFrame_UtilSetBuff` when an aura changes, not while it silently ticks. Entries were being removed from `lbGlowFrames` when outside the panic window, leaving `RefreshLBGlows` with nothing to monitor. Entries are now retained while the aura is active so the ticker catches the threshold crossing regardless of hook activity
- **`lbTicker` not stopped when addon disabled** — ticker continued firing `Evaluate()` every 0.25s indefinitely when the addon was turned off. Now calls `StopLBTicker()` + `ClearLBState()` on the disabled path
- **`state.sotfActive` not cleared when SOTF alert disabled** — if `db.sotfEnabled` became false mid-session, `state.sotfActive` was never written, keeping the alert visible. `state.sotfActive` is now always assigned after the SOTF check block
- **`ClearLBState` Lua forward-reference crash** — added glow table cleanup to `ClearLBState` which is defined before `lbGlowFrames`/`rejuvGlowFrames` are declared. Lua closures capture variable slots at definition time — the function always held `nil`. Extracted into a separate `ClearAllGlows()` function defined after the table declarations. This was causing a `bad argument #1 to 'pairs' (table expected, got nil)` error that climbed rapidly in combat
- **Alerts not cleared on player death** — `PLAYER_DEAD` and `PLAYER_ALIVE` events now registered. Death wipes all active state immediately; resurrect triggers a fresh Evaluate
- **SOTF alert not clearing immediately on Rejuv cast** — `state.sotfActive`, `state.sotfExpire`, and `state.sotfWasActive` are now cleared synchronously in `UNIT_SPELLCAST_SUCCEEDED` before the deferred Evaluate, closing a race condition window
- **Sound defaults not working without LibSharedMedia** — `Bell` and `Ping` were missing from `BUNDLED_SOUNDS` despite the files being present. Both are now registered and work standalone

---

# v12.0.1.2 (2026-04-01)

## Bug Fixes

### Combat reliability — complete overhaul
WoW 12.0's secret-value system restricts aura data reads in M+/rated combat. All alert and sound failures in combat have been resolved through three complementary approaches:

- **All event-driven `Evaluate()` calls are now deferred** via `C_Timer.After(0, ...)`. Direct calls from events like `PLAYER_TARGET_CHANGED` inherited taint from secure frame operations, causing `aura.spellId` to be flagged as "tainted by NemHotAlerts" and throw on the next read. Deferring breaks the taint chain
- **`issecretvalue()` is now the first gate** in all aura evaluation paths, checked before any field access. This mirrors LifebloomGlow's pattern and is more robust than per-field guards — one check at the top, all fields safe below it
- **SOTF detection now uses spell-cast tracking as a combat fallback.** `GetAuraDataBySpellID` returns a restricted placeholder in combat. The addon now also tracks SOTF via `UNIT_SPELLCAST_SUCCEEDED`: Swiftmend sets a `sotfProcPending` flag, and casting Rejuvenation/Germination/Regrowth clears it. This event is not subject to secret-value restrictions
- **SOTF timer now starts immediately** when Swiftmend is cast, seeded from `GetTime()`, rather than waiting for a successful aura query
- **SOTF alert now persists when entering combat** with the proc already active. `PLAYER_REGEN_DISABLED` carries forward the pending state so the combat fallback path keeps the alert alive
- **`PLAYER_REGEN_DISABLED` and `PLAYER_REGEN_ENABLED` now registered** to re-evaluate on combat transitions

### Other fixes
- Lifebloom scan switched to `GetAuraDataBySpellID`, bypassing secret-value comparison failures
- All `C_UnitAuras` API calls use the module-level localized table reference, consistent with LifebloomGlow

## Options Panel
- Sounds section height corrected to match Nem: Pet Alerts exactly
- Alert rows and buttons repositioned to match Nem: Pet Alerts spacing

## Slash Commands
Added missing commands to match Nem: Pet Alerts parity:
- `/nha on` / `/nha off` / `/nha toggle`
- `/nha status` — show enabled state, test mode, and per-alert status
- `/nha version` — show addon version
- `/nha reset` — wipe saved variables and reload UI
- `/nha unlock` — unlock frame
- All commands available via `/hotalerts` alias

---

# v12.0.1.1 (2026-03-31)

Initial release of **Nem: HoT Alerts**. Part of the Nem addon suite.

---

## Overview

Nem: HoT Alerts is a Restoration Druid addon that provides text alerts, countdown timers, and icon proc glows for Lifebloom pandemic tracking and Soul of the Forest proc consumption. Built as a standalone, self-contained addon with full options panel, configurable sounds, and font customization — matching the Nem suite visual style.

---

## Text Alerts

- **Lifebloom Expiring** — displays `* LIFEBLOOM EXPIRING *` when Lifebloom enters its pandemic window (last 4.5 seconds of base duration). Anchored to a fixed 4.5s window so Swiftmend extensions never change the trigger timing
- **Soul of the Forest** — displays `* CAST REJUV *` when the Soul of the Forest proc buff is active on the player
- Both alerts support configurable text colors, flash animation, and independent enable/disable toggles
- Alert position is draggable and saved per session

## Countdown Timers

- **Lifebloom timer** — live per-frame countdown displayed beneath the LB alert text, color-coded by urgency:
  - `4.5s – 2.1s` → `#aaff00` yellow-green
  - `2.0s – 1.1s` → `#ffd000` gold
  - `1.0s and below` → `#ff6600` deep orange
- **Soul of the Forest timer** — live per-frame countdown displayed beneath the SOTF alert text, color-coded by urgency:
  - `15s – 10.1s` → `#aaff00` yellow-green
  - `10s – 5.1s` → `#ffd000` gold
  - `5.0s and below` → `#ff6600` deep orange
- Both timers are anchored to their respective alert rows and move together when the frame is repositioned
- Timer font, scale, and size all scale proportionally with the alert font settings
- Each timer has an independent **Show Timer** toggle in the options panel (checked by default)

## Icon Glow

- Attaches a LibCustomGlow-1.0 `ProcGlow` border glow directly to buff frame icons in the game UI
- **Lifebloom** icons glow in the configured LB color when inside the pandemic window
- **Empowered Rejuvenation / Germination** icons glow in the configured SOTF color when the Soul of the Forest proc was consumed into the cast (detected via icon ID change)
- Glow operates independently of text alert toggles
- Compatible with Compact unit frames (party, raid), Target frame, and Focus frame
- Toggle on/off via the **Icon Glow** option in the Display section

## Sounds

- Configurable sound alert for **Lifebloom Expiring** and **Soul of the Forest**
- 13 bundled sounds in `Media\` folder
- LibSharedMedia-3.0 support for additional sounds from other addons

## Options Panel

- Display, Sounds, and Alerts sections matching Nem: Pet Alerts layout
- Test mode with live cycling countdowns through all color tiers
- Font dropdown (46 bundled fonts), scale and size sliders, color pickers

## Technical

- Single-file build, self-contained with bundled Fonts, Media, and Libs
- MIT licensed — Copyright (c) 2026 Nemreaper
- Slash commands: `/nha`, `/hotalerts`
- Addon compartment button support
