Skip to content

Commit b370e8b

Browse files
committed
Fix potential issues with certain actionbutton addons
1 parent 262b8a4 commit b370e8b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

core/ReduceTaint.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
local isDF = select(4, GetBuildInfo()) < 110000;
2-
if isDF then return; end -- I don't feel like making sure it works on DF, with just 1 week left :)
3-
41
-- Only run if TTT (with its taint module) is missing
52
-- This module is pretty much a copy/paste my TTT taint module
63
if C_AddOns.IsAddOnLoaded('TalentTreeTweaks') then return; end
@@ -251,7 +248,7 @@ function Module:HandleActionBarEventTaintSpread()
251248
['UNIT_FLAGS'] = true,
252249
['UNIT_AURA'] = true,
253250
}
254-
for _, actionButton in pairs(ActionBarButtonEventsFrame.frames) do
251+
local function registerActionButtonEvents(actionButton)
255252
--@debug@
256253
hooksecurefunc(actionButton, 'UnregisterEvent', function(_, event)
257254
if events[event] then
@@ -266,6 +263,12 @@ function Module:HandleActionBarEventTaintSpread()
266263
actionButton:RegisterUnitEvent(petUnitEvent, 'pet');
267264
end
268265
end
266+
for _, actionButton in pairs(ActionBarButtonEventsFrame.frames) do
267+
registerActionButtonEvents(actionButton);
268+
end
269+
hooksecurefunc(ActionBarButtonEventsFrame, 'RegisterFrame', function(_, actionButton)
270+
registerActionButtonEvents(actionButton);
271+
end);
269272
for event in pairs(events) do
270273
ActionBarButtonEventsFrame:UnregisterEvent(event);
271274
end

0 commit comments

Comments
 (0)