Skip to content

fix(unitframes): weapon enchant swipe not hiding duration swipe - #2016

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
JuJuFX-dev:fix/pab-weapon-enchant-swipe
Sep 8, 2026
Merged

fix(unitframes): weapon enchant swipe not hiding duration swipe#2016
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
JuJuFX-dev:fix/pab-weapon-enchant-swipe

Conversation

@JuJuFX-dev

Copy link
Copy Markdown
Contributor

What does this PR do?

Turning off "Show Duration Swipe" on the Player Aura Bars buff bar now also turns it off on the Weapon Enchants cells. Until now the toggle left the oil and imbue icons with a dark cooldown wedge that sat frozen for the entire duration of the enchant, or with no swipe at all, depending on the pass.

The cells gated the swipe with Cooldown:SetShown alone, and PaintContent's SetCooldown re-shows the frame in the same pass. A cooldown started while the frame was hidden then renders a wedge that never advances, so which of the two writes landed last for a given button decided what the player saw. The gate now uses persistent cooldown style instead: SetDrawSwipe plus alpha 0 on the cooldown frame, change-guarded, applied both from ApplyStyle and from PaintContent so a toggle flipped during combat still lands. SetShown stays in the out-of-combat path, because Show/Hide is blocked on the secure trio's descendants. As a side effect the finish bling on the enchant icons is suppressed as well while the swipe is off.

Second fix in the same area: RestyleBars now pokes WeaponEnchants_Layout. AK.RestyleSoon only reaches engine buttons, so the callers that restyle without ApplyLiveConfig (global font and outline changes, profile switches and spec-override swaps through the _EUF_ReloadFrames tail) left the enchant cells rendering with the previous profile's style.

How was it tested?

Tested in game on the live client.

Checklist

  • New settings default OFF (no behavior change without opt-in) - N/A, no new setting; this makes an existing per-bar toggle work on the enchant cells
  • 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) - the gate is change-guarded, so a steady state costs one boolean compare per button per paint
  • 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

…pe toggle

The Player Aura Bars weapon-enchant cells gated their duration swipe with
Cooldown:SetShown alone, and PaintContent's SetCooldown re-shows the frame in
the same pass. A cooldown started while the frame was hidden then renders as a
wedge that never advances, so turning the swipe off left either a frozen swipe
or nothing behind, depending on which of the two writes landed last for that
button in that pass.

Gate the swipe as persistent cooldown style instead: SetDrawSwipe plus alpha 0
on the cooldown frame, change-guarded, applied from ApplyStyle and from
PaintContent so a toggle flipped in lockdown still lands. Both calls are in the
render class the secure trio already relies on; SetShown stays in ApplyStyle,
which runs out of combat only, since Show/Hide is blocked on a protected
frame's descendants.

Also poke WeaponEnchants_Layout from RestyleBars. RestyleSoon only reaches the
engine buttons, so the callers that restyle without ApplyLiveConfig (global
font and outline changes, profile and spec-override swaps through the
_EUF_ReloadFrames tail) left the enchant cells on the previous style.
@EllesmereGaming
EllesmereGaming merged commit 6ce7f17 into EllesmereGaming:main Sep 8, 2026
1 check passed
@JuJuFX-dev
JuJuFX-dev deleted the fix/pab-weapon-enchant-swipe branch September 8, 2026 07:28
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