Skip to content

Fix dispel overlay gradient snapping to full brightness after OOR transition#89

Merged
DanderBot merged 3 commits into
DanderBot:mainfrom
Krathe82:fix/dispel-overlay-oor-brightness
May 17, 2026
Merged

Fix dispel overlay gradient snapping to full brightness after OOR transition#89
DanderBot merged 3 commits into
DanderBot:mainfrom
Krathe82:fix/dispel-overlay-oor-brightness

Conversation

@Krathe82

Copy link
Copy Markdown
Contributor

Root cause

UpdateDispelOverlayAppearance (called every ~0.2s by the range timer) was passing alpha = 1.0 as the in-range value for every element, including the gradient. When a unit went OOR the gradient was correctly dimmed to oorAlpha, but on returning in range it was restored to 1.0 rather than the configured dispelGradientAlpha.

This was masked before PR #65 because ShowOverlayWithSecretColor also used 1.0 for the gradient — both functions agreed. PR #65 correctly changed ShowOverlayWithSecretColor to use the configured alpha, but UpdateDispelOverlayAppearance was not updated to match. The dfLastDispelAuraID skip (added earlier for performance) then prevented ShowOverlayWithSecretColor from 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 UpdateDispelOverlayAppearance derived from the same settings that ShowOverlayWithSecretColor uses:

  • Gradient: min(dispelGradientAlpha * dispelGradientIntensity, 1.0) * deadAlpha
  • Borders: dispelBorderAlpha * deadAlpha
  • Icons: dispelIconAlpha * deadAlpha

OOR dimming is applied as a multiplier on top of these base values, matching the behaviour in ShowOverlayWithSecretColor and ApplyDispelOverlayAppearance.

Test

  1. In a raid, have a unit with a dispellable debuff and the dispel overlay visible at its configured opacity
  2. Move out of range of that unit and back in — the gradient should return to the same opacity it had before going OOR, not jump to full brightness

Krathe82 added 2 commits May 15, 2026 22:48
…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 DanderBot merged commit 882d2f6 into DanderBot:main May 17, 2026
@Krathe82 Krathe82 deleted the fix/dispel-overlay-oor-brightness branch June 4, 2026 12:42
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
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.

2 participants