Fix: CDM show buff and target debuff stack count at 1 stack - #2083
Open
daniel-lewinski wants to merge 1 commit into
Open
daniel-lewinski wants to merge 1 commit into
daniel-lewinski wants to merge 1 commit into
Conversation
daniel-lewinski
force-pushed
the
fix/show-buff-at-1-stack
branch
from
September 14, 2026 10:17
c24f3c8 to
407bb39
Compare
daniel-lewinski
marked this pull request as ready for review
September 14, 2026 10:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Displays the stack count text when a buff or player-applied target debuff is at 1 stack (in addition to 2+ stacks), across Cooldown Manager (
BuffIconCooldownViewer) icons, tracking buff bars, and AuraKit engine aura buttons. By default, Blizzard's native aura widgets hide the count text at 0 and 1 stack, only revealing numbers starting from 2 stacks.Cause
In World of Warcraft (Midnight 12.x):
EllesmereUI_AuraKit.lua):button:SetApplicationCount(d.stack, {})is called with empty options, causing Blizzard's internal formatter to default to hiding count text when application count <= 1.EllesmereUICooldownManager.lua):icon.Applicationsfontstrings rely on Blizzard's internal display logic which suppresses rendering at 1 stack.EllesmereUICdmBuffBars.lua):UpdateStackschecksappsText.GetText(appsText). Since Blizzard's native text is empty string""at 1 stack,bar._stacksTextis hidden even thoughReadStackApplications(blzChild)reads 1.Fix
AuraKit Stack Formatter (
EllesmereUI_AuraKit.lua):AK.GetStackFormatter()usingC_StringUtil.CreateNumericRuleFormatter()with breakpoints{ threshold = 0, format = "" }and{ threshold = 1, format = "%d" }.button:SetApplicationCount(d.stack, { formatter = stackFmt }).CDM Single-Stack Display & Mirror (
EllesmereUICooldownManager.lua):RefreshCDMIconAppearance, creates a dedicated overlay FontString mirror (icon._euiStackText) positioned identically to the native stack count text and sets Blizzard's nativeicon.Applications.Applicationsalpha to 0.ns.UpdateSingleStackText(icon)which safely resolves application count fromicon.auraDataCached.applicationsorC_UnitAuras.GetAuraDataByAuraInstanceID(guarding against secret values in 12.x combat environments).OnAuraInstanceInfoSet,OnUnitAuraUpdatedEvent,OnUnitAuraAddedEvent,ClearAuraInstanceInfo,OnAuraInstanceInfoCleared,OnCooldownIDSet) on CDM frames once per frame usinghooksecurefunc.PLAYER_TARGET_CHANGEDon an addon-owned frame to update target debuff single-stack counts when switching targets.showChargeStackText = false(csAlpha == 0).Tracking Buff Bars (
EllesmereUICdmBuffBars.lua):UpdateStacks, falls back toReadStackApplications(blzChild)if nativeappsTextis empty, showing the stack text when applications are present.Cost
hooksecurefuncon aura lifecycle hooks andPLAYER_TARGET_CHANGED.issecretvalue()andpcall, andFontString:SetText()is used as a safe sink.How was it tested?
PLAYER_TARGET_CHANGED.Show Charges/Stacks Text: Off(showChargeStackText = false) continues to hide the count text cleanly.Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard frames