Quantcast

Update for TukUI and ElvUI

Xruptor [12-29-15 - 14:51]
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.
Filename
RightClickSelfCast.lua
RightClickSelfCast.toc
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