Quantcast

Fixing Tradeskill buttons

MilleXIV [08-28-16 - 15:18]
Fixing Tradeskill buttons

Pulling actual name instead of guessing (which doesn't work)
Filename
modules/tradeskill.lua
diff --git a/modules/tradeskill.lua b/modules/tradeskill.lua
index 1a1e8c6..2dbee7a 100644
--- a/modules/tradeskill.lua
+++ b/modules/tradeskill.lua
@@ -139,7 +139,8 @@ function TradeskillModule:StyleTradeskillFrame(framePrefix, profIndex)
   end
   self[framePrefix..'Frame']:SetSize(iconSize + self[framePrefix..'Text']:GetStringWidth() + 5, xb:GetHeight())

-  self[framePrefix..'Frame']:SetAttribute('spell', name) --- While this is usually the type of thing I'd put into RegisterFrameEvents(), I need it to update
+  local spellName, subSpellName = GetSpellBookItemName(spellOffset + 1, BOOKTYPE_PROFESSION)
+  self[framePrefix..'Frame']:SetAttribute('spell', spellName) --- While this is usually the type of thing I'd put into RegisterFrameEvents(), I need it to update
 end

 function TradeskillModule:CreateFrames()