Quantcast

Shuffle things around

Adrian L Lange [05-27-13 - 20:43]
Shuffle things around
Filename
Molinari.lua
diff --git a/Molinari.lua b/Molinari.lua
index 326be6a..4ea5456 100644
--- a/Molinari.lua
+++ b/Molinari.lua
@@ -4,15 +4,6 @@ local button = CreateFrame('Button', addonName, UIParent, 'SecureActionButtonTem
 button:SetScript('OnEvent', function(self, event, ...) self[event](self, ...) end)
 button:RegisterEvent('PLAYER_LOGIN')

-local function ScanTooltip(self, spells)
-	for index = 1, self:NumLines() do
-		local info = spells[_G['GameTooltipTextLeft' .. index]:GetText()]
-		if(info) then
-			return unpack(info)
-		end
-	end
-end
-
 local scripts = {'OnClick', 'OnMouseUp', 'OnMouseDown'}

 local function ParentClick(self, button, ...)
@@ -44,6 +35,15 @@ local function ApplyButton(itemLink, spell, r, g, b)
 	end
 end

+local function ScanTooltip(self, spells)
+	for index = 1, self:NumLines() do
+		local info = spells[_G['GameTooltipTextLeft' .. index]:GetText()]
+		if(info) then
+			return unpack(info)
+		end
+	end
+end
+
 function button:PLAYER_LOGIN()
 	local spells, disenchanter, lockpicking, smith = {}
 	if(IsSpellKnown(51005)) then