Skip to content

Commit

Permalink
Fix potential issues with certain actionbutton addons
Browse files Browse the repository at this point in the history
  • Loading branch information
Numynum committed Aug 20, 2024
1 parent dc1a330 commit e82e894
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/reduceTaint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ function Module:HandleActionBarEventTaintSpread()
['UNIT_FLAGS'] = true,
['UNIT_AURA'] = true,
}
for _, actionButton in pairs(ActionBarButtonEventsFrame.frames) do
local function registerActionButtonEvents(actionButton)
--@debug@
hooksecurefunc(actionButton, 'UnregisterEvent', function(_, event)
if events[event] then
Expand All @@ -402,6 +402,12 @@ function Module:HandleActionBarEventTaintSpread()
actionButton:RegisterUnitEvent(petUnitEvent, 'pet');
end
end
for _, actionButton in pairs(ActionBarButtonEventsFrame.frames) do
registerActionButtonEvents(actionButton);
end
hooksecurefunc(ActionBarButtonEventsFrame, 'RegisterFrame', function(_, actionButton)
registerActionButtonEvents(actionButton);
end);
for event in pairs(events) do
ActionBarButtonEventsFrame:UnregisterEvent(event);
end
Expand Down

0 comments on commit e82e894

Please sign in to comment.