Skip to content

Commit

Permalink
The magic to prevent action button taint should now be fully automagi…
Browse files Browse the repository at this point in the history
…c while outside combat; inside combat it may still require mouse movement
  • Loading branch information
Numynum committed Sep 4, 2024
1 parent 4518a14 commit adad52f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/reduceTaint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ function Module:HandleOnBarHighlightMarkTaint()

C_AddOns.LoadAddOn('Blizzard_ProfessionsBook');
local name = 'TalentTreeTweaks_ActionBarHighlightMarkTaintCleanser';
local cleanser = CreateFrame('CheckButton', name, nil, 'ProfessionButtonTemplate');
--- @type ProfessionButtonTemplate|SecureHandlerBaseTemplate|table
local cleanser = CreateFrame('CheckButton', name, nil, 'ProfessionButtonTemplate,SecureHandlerBaseTemplate');
cleanser.cooldown:Hide();
for _, region in pairs({ cleanser:GetRegions() }) do
if region.Hide then region:Hide(); end
Expand All @@ -133,7 +134,10 @@ function Module:HandleOnBarHighlightMarkTaint()
end);
cleanser:SetScript("OnHide", nil);
cleanser:SetScript("OnClick", nil);
cleanser:SetScript("OnEnter", nil);
cleanser:SetScript("OnEnter", function()
if InCombatLockdown() then return; end
cleanser:Execute([[ self:Hide(); ]]);
end);
cleanser:HookScript("OnLeave", function()
Util:AddToCombatLockdownQueue(function()
if issecurevariable('ON_BAR_HIGHLIGHT_MARKS') then
Expand Down

0 comments on commit adad52f

Please sign in to comment.