Quantcast

dock update

Munglunch [07-29-14 - 20:45]
dock update
Filename
Interface/AddOns/SVUI/packages/dock/SVDock.lua
diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua
index c52a93f..3c02718 100644
--- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua
+++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua
@@ -48,19 +48,20 @@ SuperDockletMain.FrameName = "None";
 SuperDockletExtra.FrameName = "None";
 local ICONFILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-BAG-MICRO]];
 local TOOL_DATA = {
-	[171] 	= {0,0.25,0,0.25}, 					-- PRO-ALCHEMY
-    [794] 	= {0.25,0.5,0,0.25,"Survey"}, 		-- PRO-ARCHAELOGY
-    [164] 	= {0.5,0.75,0,0.25}, 				-- PRO-BLACKSMITH
-    [185] 	= {0.75,1,0,0.25,"Cooking Fire"}, 	-- PRO-COOKING
-    [333] 	= {0,0.25,0.25,0.5,"Disenchant"}, 	-- PRO-ENCHANTING
-    [202] 	= {0.25,0.5,0.25,0.5}, 				-- PRO-ENGINEERING
-    [129] 	= {0.5,0.75,0.25,0.5}, 				-- PRO-FIRSTAID
-    [773] 	= {0,0.25,0.5,0.75,"Milling"}, 		-- PRO-INSCRIPTION
-    [755] 	= {0.25,0.5,0.5,0.75,"Prospecting"},-- PRO-JEWELCRAFTING
-    [165] 	= {0.5,0.75,0.5,0.75}, 				-- PRO-LEATHERWORKING
-    [186] 	= {0.75,1,0.5,0.75}, 				-- PRO-MINING
-    [197] 	= {0.25,0.5,0.75,1}, 				-- PRO-TAILORING
+	[171] 	= {0,0.25,0,0.25}, 				-- PRO-ALCHEMY
+    [794] 	= {0.25,0.5,0,0.25,80451}, 		-- PRO-ARCHAELOGY
+    [164] 	= {0.5,0.75,0,0.25}, 			-- PRO-BLACKSMITH
+    [185] 	= {0.75,1,0,0.25,818,93636}, 	-- PRO-COOKING
+    [333] 	= {0,0.25,0.25,0.5,13262}, 		-- PRO-ENCHANTING
+    [202] 	= {0.25,0.5,0.25,0.5}, 			-- PRO-ENGINEERING
+    [129] 	= {0.5,0.75,0.25,0.5}, 			-- PRO-FIRSTAID
+    [773] 	= {0,0.25,0.5,0.75,51005}, 		-- PRO-INSCRIPTION
+    [755] 	= {0.25,0.5,0.5,0.75,31252},	-- PRO-JEWELCRAFTING
+    [165] 	= {0.5,0.75,0.5,0.75}, 			-- PRO-LEATHERWORKING
+    [186] 	= {0.75,1,0.5,0.75}, 			-- PRO-MINING
+    [197] 	= {0.25,0.5,0.75,1}, 			-- PRO-TAILORING
 }
+local HEARTH_SPELLS = {556,50977,18960,126892}
 --[[
 ##########################################################
 PRE VARS/FUNCTIONS
@@ -716,7 +717,11 @@ do
 		button.TText = "Open " .. proName;
 		button:SetAttribute("type", "macro")
 		if(data[5]) then
-			local rightClickSpell = data[5]
+			local rcSpellID = data[5]
+			if(data[6] and IsSpellKnown(data[6])) then
+				rcSpellID = data[6]
+			end
+			local rightClickSpell = GetSpellInfo(rcSpellID)
 			button:SetAttribute("macrotext", "/cast [mod:shift]" .. rightClickSpell .. "; " .. proName)
 			button.TText2 = "Shift-Click to use " .. rightClickSpell
 		else
@@ -751,22 +756,13 @@ do
 		hearth:SetAttribute("type", "item")
 		hearth:SetAttribute("item", "Hearthstone")

-		if(SuperVillain.class == "SHAMAN") then
-			hearth:SetAttribute("type2", "spell")
-			hearth:SetAttribute("spell", "Astral Recall")
-			hearth.ExtraSpell = "Astral Recall"
-		elseif(SuperVillain.class == "DEATHKNIGHT") then
-			hearth:SetAttribute("type2","spell")
-			hearth:SetAttribute("spell","Death Gate")
-			hearth.ExtraSpell = "Death Gate"
-		elseif(SuperVillain.class == "DRUID") then
-			hearth:SetAttribute("type2", "spell")
-			hearth:SetAttribute("spell", "Teleport: Moonglade")
-			hearth.ExtraSpell = "Teleport: Moonglade"
-		elseif(SuperVillain.class == "MONK") then
-			hearth:SetAttribute("type2", "spell")
-			hearth:SetAttribute("spell", "Zen Pilgrimage")
-			hearth.ExtraSpell = "Zen Pilgrimage"
+		for i = 1, #HEARTH_SPELLS do
+			if(IsSpellKnown(HEARTH_SPELLS[i])) then
+				local rightClickSpell = GetSpellInfo(HEARTH_SPELLS[i])
+				hearth:SetAttribute("type2", "spell")
+				hearth:SetAttribute("spell", rightClickSpell)
+				hearth.ExtraSpell = rightClickSpell
+			end
 		end

 		local proName, proID