Fix dispel overlay gradient snapping to full brightness after OOR transition#89
Merged
DanderBot merged 3 commits intoMay 17, 2026
Merged
Conversation
…nsition UpdateDispelOverlayAppearance was restoring the gradient to alpha 1.0 when a unit came back in range, ignoring the configured dispelGradientAlpha. This was masked before PR DanderBot#65 because ShowOverlayWithSecretColor also used 1.0, but after DanderBot#65 corrected that function to use the configured alpha the two fell out of sync. The dfLastDispelAuraID skip then prevented ShowOverlay from correcting it, leaving the gradient stuck at full brightness permanently. Fix: use element-specific alphas (gradientAlpha, borderAlpha, iconAlpha) derived from settings in UpdateDispelOverlayAppearance, matching what ShowOverlayWithSecretColor applies, so OOR->in-range transitions restore the correct opacity rather than 1.0.
Krathe82
added a commit
to Krathe82/DandersFrames
that referenced
this pull request
May 15, 2026
ShowOverlayWithSecretColor hardcodes 1.0 for all border and icon textures. Reading dispelBorderAlpha/dispelIconAlpha in UpdateDispelOverlayAppearance caused ~5Hz flicker for users with non-default values (UNIT_AURA sets 1.0, range ticker dims them back). Gradient alpha correctly reads the configured value — that was the actual bug. Border/icon alignment with user settings is a follow-up.
DanderBot
added a commit
that referenced
this pull request
May 17, 2026
Krathe82
added a commit
to Krathe82/DandersFrames
that referenced
this pull request
Jun 6, 2026
Krathe82
pushed a commit
to Krathe82/DandersFrames
that referenced
this pull request
Jun 6, 2026
…brightness Fix dispel overlay gradient snapping to full brightness after OOR transition
Krathe82
pushed a commit
to Krathe82/DandersFrames
that referenced
this pull request
Jun 6, 2026
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.
Root cause
UpdateDispelOverlayAppearance(called every ~0.2s by the range timer) was passingalpha = 1.0as the in-range value for every element, including the gradient. When a unit went OOR the gradient was correctly dimmed tooorAlpha, but on returning in range it was restored to1.0rather than the configureddispelGradientAlpha.This was masked before PR #65 because
ShowOverlayWithSecretColoralso used1.0for the gradient — both functions agreed. PR #65 correctly changedShowOverlayWithSecretColorto use the configured alpha, butUpdateDispelOverlayAppearancewas not updated to match. ThedfLastDispelAuraIDskip (added earlier for performance) then preventedShowOverlayWithSecretColorfrom correcting the value on subsequent ticks, leaving the gradient stuck at full brightness permanently after any OOR→in-range transition.Fix
Use element-specific alphas in
UpdateDispelOverlayAppearancederived from the same settings thatShowOverlayWithSecretColoruses:min(dispelGradientAlpha * dispelGradientIntensity, 1.0) * deadAlphadispelBorderAlpha * deadAlphadispelIconAlpha * deadAlphaOOR dimming is applied as a multiplier on top of these base values, matching the behaviour in
ShowOverlayWithSecretColorandApplyDispelOverlayAppearance.Test