Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

ActionButton overlay glow (proc) isn't restored after toggling ActionBar visibility #540

Open dolandemort opened 3 months ago

dolandemort commented 3 months ago

If a skill on an action bar has the proc overlay glow, and then the bar is hidden (as with the new Edit Mode combat visibility setting), and then the bar is shown again, the skill no longer has the overlay glow. The problem lies in the function ActionButton_ShowOverlayGlow in ActionButton.lua:

function ActionButton_ShowOverlayGlow(button)
    ActionButton_SetupOverlayGlow(button);
    if not button.SpellActivationAlert:IsShown() then
        button.SpellActivationAlert:Show();
        button.SpellActivationAlert.ProcStartAnim:Play();
    end
end

The SpellActivationAlert:IsShown() returns true, but the animation is no longer playing (I think it is stopped after the bar is hidden) so the animation doesn't continue to play after the bar is shown again.

The following code has allowed me to mitigate it and may be of some use to somebody, either for their own mitigation or for anyone triaging this bug in the future:

local actionBars = {MainMenuBar, MultiBarBottomLeft, MultiBarBottomRight, MultibarLeft, MultibarRight, MultiBar5, MultiBar6, MultiBar7};

for i, bar in pairs(actionBars) do
  bar:HookScript('OnShow', function()
    for i, button in pairs(bar.actionButtons) do
      if (button.SpellActivationAlert and button.SpellActivationAlert:IsShown()) then
        button.SpellActivationAlert.ProcStartAnim:Play();
      end
    end
  end);
end