From bf8a6f3d7e648d265f0164215ed01a4fad339c85 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Tue, 29 Dec 2015 09:51:30 -0500 Subject: [PATCH] Update for TukUI and ElvUI Modified the code again to remove checks isAddOnLoaded() checks for TukUI and ElvUI. Since there are so many different modified versions of TukUI and ElvUI. Just do a cover all for them. --- RightClickSelfCast.lua | 25 ++++++++++++------------- RightClickSelfCast.toc | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/RightClickSelfCast.lua b/RightClickSelfCast.lua index 2148d13..b004cc5 100644 --- a/RightClickSelfCast.lua +++ b/RightClickSelfCast.lua @@ -66,26 +66,25 @@ function f:PLAYER_LOGIN() -- ElvUI (Author: Elv22, TukUI fork) -- https://www.tukui.org/about.php?ui=elvui - if IsAddOnLoaded('ElvUI') then - local barID = 1 - while _G["ElvUI_Bar"..barID] do - for _,button in next,_G["ElvUI_Bar"..barID].buttons,nil do - button:SetAttribute("unit2", "player") - end - barID = barID+1 + -- Since there are so many different forks/modifications of ElvUI out there. Just do it without using IsAddOnLoaded() + local barID = 1 + while _G["ElvUI_Bar"..barID] do + for _,button in next,_G["ElvUI_Bar"..barID].buttons,nil do + button:SetAttribute("unit2", "player") end + barID = barID+1 end -- Tukui (Author: Elv22, TukUI fork) -- https://www.tukui.org - if IsAddOnLoaded('Tukui') then - for id=1, 12 do - local button = _G["ActionButton"..id] - if button ~= nil then - button:SetAttribute("unit2", "player") - end + -- Since there are so many different forks/modifications of Tukui out there. Just do it without using IsAddOnLoaded() + for id=1, 12 do + local button = _G["ActionButton"..id] + if button ~= nil then + button:SetAttribute("unit2", "player") end end + self:UnregisterEvent("PLAYER_LOGIN") self.PLAYER_LOGIN = nil diff --git a/RightClickSelfCast.toc b/RightClickSelfCast.toc index 743c3bb..8bc3fc6 100644 --- a/RightClickSelfCast.toc +++ b/RightClickSelfCast.toc @@ -1,7 +1,7 @@ ## Interface: 60200 ## Title: RightClickSelfCast ## Author: Xruptor -## Version: 2.5 +## Version: 2.6 ## Notes: Makes all the Blizzard actionbars always self-cast on right-click (regardless of current target) RightClickSelfCast.lua \ No newline at end of file -- 1.7.9.5