Skip to content

feat(cdm): add min-stack threshold gate to bar glows - #1910

Closed
erickjmoreno wants to merge 1 commit into
EllesmereGaming:mainfrom
erickjmoreno:feat/cdm-bar-glow-stack-threshold
Closed

feat(cdm): add min-stack threshold gate to bar glows#1910
erickjmoreno wants to merge 1 commit into
EllesmereGaming:mainfrom
erickjmoreno:feat/cdm-bar-glow-stack-threshold

Conversation

@erickjmoreno

@erickjmoreno erickjmoreno commented Sep 1, 2026

Copy link
Copy Markdown

What does this PR do?

Adds an opt-in "Require Min Stacks" setting to Cooldown Manager Bar Glows. The glow only starts once the tracked buff/debuff reaches a configured stack/application count (2-99), instead of glowing on presence alone.

Applications counts can be a SECRET value even in open-world content, so the threshold compare never happens in Lua (any compare on a secret value hard-errors). Instead a one-unit StatusBar window [threshold-1, threshold] performs the compare C-side via SetValue, and a mask riding that fill's edge crops the native glow texture -- same technique already used by the per-icon "Glow at Stacks" feature.

How was it tested?

  • Verified the new stack cache (ns._tickBlizzAuraStacks) is populated from the same sid/baseSID/linked resolution pass as the existing active cache, so it matches whatever spellID a Bar Glow entry is saved against.
  • Verified the option row follows the existing DualRow pattern and is disabled in Buff Missing mode (stacks don't apply there).
  • Verified the gate/mask frames are only created lazily on first use (threshold > 1 and glow active), so unopted-in users pay nothing.

Screenshots

N/A -- adds one settings row using the existing DualRow widget shape; no new visual style.

Checklist

  • New settings default OFF (no behavior change without opt-in)
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations)
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames
  • Tested in-game on live; no version gates or pre-Midnight APIs added

Adds an opt-in Require Min Stacks setting to Cooldown Manager Bar Glows.
The glow only activates once the tracked buff reaches the configured
stack count. Applications counts can be SECRET even in open-world
content, so the threshold compare never touches Lua: a StatusBar
window performs the compare C-side via SetValue, and its fill mask
crops the native glow texture. Same technique as the existing
per-icon Glow at Stacks feature.
@erickjmoreno
erickjmoreno deleted the feat/cdm-bar-glow-stack-threshold branch September 1, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant