Skip to content

Commit

Permalink
Put in a workaround to allow opening and closing the talent UI in combat
Browse files Browse the repository at this point in the history
  • Loading branch information
Numynum committed Jan 7, 2023
1 parent bdd21f3 commit 4c8a17b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions modules/reduceTaint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@ function Module:SetupHook()

-- GetSentinelKeyInfoFromSelectionID happens just before callbacks are executed, so that's the ideal place to check for taint
self:SecureHook(ClassTalentFrame.TalentsTab.LoadoutDropDown, 'GetSentinelKeyInfoFromSelectionID', function(dropdown, selectionID) self:CheckShareButton(dropdown, selectionID) end);

-- ToggleTalentFrame starts of with a ClassTalentFrame:SetInspecting call, which has a high likelihood of tainting execution
self:SecureHook('ShowUIPanel', 'OnShowUIPanel')
self:SecureHook('HideUIPanel', 'OnHideUIPanel')
end

function Module:OnShowUIPanel(frame)
if frame ~= ClassTalentFrame then return end
if (frame.IsShown and not frame:IsShown()) then
-- if possible, force show the frame, ignoring the INTERFACE_ACTION_BLOCKED message
frame:Show()
end
end

function Module:OnHideUIPanel(frame)
if frame ~= ClassTalentFrame then return end
if (frame.IsShown and frame:IsShown()) then
-- if possible, force hide the frame, ignoring the INTERFACE_ACTION_BLOCKED message
frame:Hide()
end
end

function Module:OnShowSelections()
Expand Down

0 comments on commit 4c8a17b

Please sign in to comment.