Lifebloom Cue - World of Warcraft Retail 12.0.7
Version 1.4.9

What it does
------------
This addon watches your own Lifebloom on friendly visible units and alerts you when the remaining duration reaches your chosen threshold.

Key terms
---------
Threshold:
The number of seconds left on Lifebloom before the addon warns you.
Example: threshold 4.0 means the alert fires when Lifebloom has 4 seconds or less remaining.

Display time:
How long the visual alert stays on screen before fading away.
Example: display time 2.0 means the text/flash lasts about 2 seconds.

Features
--------
- Sound alert when Lifebloom is close to expiring
- Selectable sounds:
  - Raid Warning
  - Simple Ding
  - Soft Ding
  - Soft Chime
  - Bright Ping
  - Double Ping
  - Clear Ding
  - Gentle Bell
  - Warm Chime
  - Clean Ping
  - Soft Bell
  - Triple Chime
  - Game-Style Ping
  - Map Ping
  - High Ping
  - Low Ping
  - Crystal Ping
  - Bell Ping
  - Two-Tone Ping
  - Clean Chime
  - Mellow Ping
  - Bright Ding
- Optional full-screen flash
- Optional movable alert text, default: "Refresh Lifebloom"
- Text scale slider
- Text X/Y position sliders with 1-pixel steps
- Move Text button to drag the alert text anywhere on screen
- Configurable remaining-duration threshold
- Configurable visual alert duration, default: 2 seconds
- Minimap button using the Lifebloom icon
  - Left-click: enable/disable addon
  - Right-click: open settings
  - Drag: move button around minimap
- Addon compartment support
- Raid performance toggle: by default, raids use Player + Focus only mode. The addon scans only you and your focus target, not target, mouseover, party, or raid units, to reduce CPU spikes
- Performance scan interval slider: default 0.6 sec. Higher values are smoother/less CPU; lower values react faster


Fixes in 1.4.9
--------------
- Updated for patch 12.0.7 (Interface 120007).
- No behavior changes; all v1.4.8 scanning, throttling, and secret-value safety kept as-is.

Fixes in 1.4.8
--------------
- Updated raid performance mode to be less aggressive.
- When raid performance mode is enabled, the addon now scans only player and focus while in a raid.
- Raid performance mode no longer scans target, mouseover, party units, or raid units.
- Updated settings label, helper text, tooltip, and slash-command messages to make the raid behavior clear.
- Kept v1.4.7 scan interval and UNIT_AURA throttling behavior unchanged.

Fixes in 1.4.7
--------------
- Reduced default scan frequency from 0.20 sec to 0.60 sec.
- UNIT_AURA no longer triggers immediate full aura scans. It now queues scans through the throttled OnUpdate loop.
- Added a Scan interval slider in settings. Higher values are smoother and use less CPU; lower values react faster.
- Added /lbc scan and /lbc scan <seconds>.
- Kept the v1.4.6 raid-unit skip toggle enabled by default.

Fixes in 1.4.0
--------------
- Kept all existing v1.3.0 sounds and added more ping/ding/chime options.
- Added a stricter per-Lifebloom alert latch so the same expiring Lifebloom should not alert again at 2 or 1 seconds after already alerting at your threshold.
- Added a tiny global guard between alert fires to protect against UNIT_AURA and OnUpdate triggering at the same instant.
- The alert now re-arms only when Lifebloom is actually refreshed back above the threshold window, or when the aura disappears and comes back.

Slash commands
--------------
/lbc or /lifebloomcue: open settings
/lbc on
/lbc off
/lbc toggle
/lbc test
/lbc move
/lbc threshold 4
/lbc display 2
/lbc scale 1.2
/lbc sound next
/lbc sound prev
/lbc sound list
/lbc raid
/lbc raid on   (raid performance mode: scan only player and focus in raids)
/lbc scan       (show scan interval)
/lbc scan 0.8   (lighter CPU; alerts may be delayed slightly)
/lbc raid off  (enable full raid scanning; may increase CPU use)
/lbc sound simple_ding
/lbc sound clear_ding
/lbc sound gentle_bell
/lbc sound warm_chime
/lbc sound clean_ping
/lbc sound soft_bell
/lbc sound triple_chime
/lbc sound game_ping
/lbc sound map_ping
/lbc sound crystal_ping
/lbc sound two_tone_ping
/lbc sound bright_ding

Install
-------
1. Delete or replace the old LifebloomCue folder.
2. Extract the new LifebloomCue folder into:
   World of Warcraft\_retail_\Interface\AddOns\
3. Restart the game or run /reload.
4. Enable "Lifebloom Cue" from the in-game AddOns list.

Notes
-----
The addon uses C_UnitAuras.GetAuraDataBySpellName when available and only reads friendly unit aura data. It does not use secure buttons, protected actions, spell casting, targeting, rotation logic, or any forbidden automation.

WoW does not provide a clean per-addon volume slider for PlaySoundFile. For this version, the addon-local OGG files were made louder at the file level instead.


Version 1.4.1
- Fixed a Mythic+ combat Lua error caused by using protected/secret UnitGUID values as runtime table keys.
- Unit scanning now deduplicates units through UnitIsUnit and stores alert state only with static unit tokens.
- No sound/settings behavior changed from v1.4.0.


Version 1.4.5
-------------
- Improved duplicate-alert protection.
- Keeps per-unit alert state briefly when an aura scan temporarily misses Lifebloom in combat.
- Adds a global expiration latch so the same Lifebloom expiration cannot play a second sound at 2-1 seconds.


Version 1.4.3
- Removed the AuraUtil.FindAuraByName fallback to avoid Blizzard AuraUtil data-provider errors in Retail 12.x.
- Added a protected, pcall-wrapped custom aura index scanner using C_UnitAuras.GetAuraDataByIndex.
- Kept the older UnitAura fallback guarded for compatibility.
- No sound, text, minimap, or settings behavior changed from v1.4.2.

Version 1.4.4
-------------
- Fixed a WoW 12.x secret aura value Lua error caused by directly comparing aura.spellId.
- Aura spell/name/source/expiration reads are now guarded through safe wrappers.
- Added direct C_UnitAuras.GetUnitAuraBySpellID lookup when available to avoid manual spellId comparisons.
- Added a combat-log fallback tracker for player-cast Lifebloom refresh/apply/remove events, so alerts can still work when aura fields are hidden as secret values in combat.
- No sound or UI behavior changed from v1.4.3.


v1.4.5 notes
-----------
- Fixed ADDON_ACTION_FORBIDDEN caused by runtime RegisterEvent calls.
- Moved static event registration to initial addon load.
- Disabled COMBAT_LOG_EVENT_UNFILTERED fallback to avoid 12.x protected RegisterEvent reports.
- Kept all sounds and user settings unchanged.


Version 1.4.7
-------------
- Added a new settings toggle: Skip raid units.
- When enabled, raids no longer scan raid1-raid40, which should reduce CPU spikes in raid groups.
- In raid performance mode, only player and focus are scanned in raids. Target, mouseover, party, and raid units are skipped.
- Updated the small explanation beside the toggle and tooltip to clearly state Player + Focus only behavior.
- Added /lbc raid, /lbc raid on, and /lbc raid off commands.
