diff SkeletonKey/KeyButton.lua @ 29:bb160c04de88

- update matching patterns used for picking up profession keybinds
author Nenue
date Fri, 05 Aug 2016 12:25:18 -0400
parents 73df13211b22
children b0e4d04d428a
line wrap: on
line diff
--- a/SkeletonKey/KeyButton.lua	Tue Aug 02 12:33:57 2016 -0400
+++ b/SkeletonKey/KeyButton.lua	Fri Aug 05 12:25:18 2016 -0400
@@ -387,15 +387,17 @@
     end
 
     if self.isDynamic == 'profession'  then
-      local profText = (self.spellNum == 1) and TRADE_SKILLS or (BUTTON_HEADERS[self.profIndex] or GetProfessionInfo(self.profIndex))
       if self.isAvailable then
+
+        local profText = (self.spellNum == 1) and TRADE_SKILLS or (BUTTON_HEADERS[self.profIndex] or GetProfessionInfo(self.profIndex))
         print(self.profIndex, 'spnum', type(self.spellNum), (self.spellNum == 1))
 
-        self.statusText = '|cFFFFFF00'..profText..'|r'
+        self.statusText = '|cFFFFFF00'..tostring(profText)..'|r'
         self.bindingText = kb.BindingString(GetBindingKey(self.command))
       else
-        self.statusText = '|cFFFF4400'..profText..'|r'
-        self.actionName = '(need to train profession #'..self.profNum..')'
+
+        self.statusText = '|cFFFF4400Profession|r'
+        self.actionName = '(#'..self.professionNum..')'
         self.bindingText ='?'
       end
     elseif self.isDynamic == 'talent' then