changeset 81:9a206b105ea5 v7.2.0

- Fixed profession spells not being detected on load-in - Fixed Demon Hunter Vengeance bindings, along with other spells that are replaced by specialization variants. - Spells replaced by a specialization now display the replacing name along with the original name in their binding slot.
author Nenue
date Mon, 17 Apr 2017 13:27:34 -0400
parents b9a53385462c
children cc082ee22c4c
files ActionTemplates.lua KeyButton.lua
diffstat 2 files changed, 33 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ActionTemplates.lua	Tue Mar 21 02:23:23 2017 -0400
+++ b/ActionTemplates.lua	Mon Apr 17 13:27:34 2017 -0400
@@ -37,6 +37,8 @@
   [9] = 5,
   [10] = 6
 }
+
+
 local petSpellCache,petSubtextCache
 local SUMMON_RANDOM_FAVORITE_MOUNT_SPELL = 150544
 
@@ -168,6 +170,9 @@
       info = SkeletonKey_GetGenericSpell(spellName, spellID, internalIcon or icon)
     end
   end
+
+
+
   info.isAvailable = isAvailable
 
   print('|cFF00FF88Slot Details:|r', info.actionName, info.actionID, info.dynamicType, info.isAvailable)
@@ -201,15 +206,20 @@
     local specialButtonType
     if actionType == 'spell' then
       local realName, _, _, _, _, _, realID = GetSpellInfo(name)
-      if realName and (realName ~= name) then
-        print(' *** "', name, '" resolves to something else...', realName, realID)
+      if realName then
+        if (realName ~= name) then
+        print(' *** "', name, '" is replaced by...', realName, realID)
         --name, actionID = realName, realID
         indexKey = actionType .. '_'.. realID
+        end
+      elseif configTable.dynamicType == 'talent' then
+        print(' *** "', name, '" is a non-selected talent.')
+        return
       end
 
 
 
-      local dynamicInfo = kb.DynamicSpells[spellName]
+      local dynamicInfo = kb.DynamicSpells[name]
       if dynamicInfo then
         configTable.assignedKeys = configTable.assignedKeys or {GetBindingKey(configTable.command) }
 
--- a/KeyButton.lua	Tue Mar 21 02:23:23 2017 -0400
+++ b/KeyButton.lua	Mon Apr 17 13:27:34 2017 -0400
@@ -48,6 +48,25 @@
   [6] = 5
 }
 
+-- Spell replacements that can't be easily detected
+local TALENT_SPELLS = {
+  -- Shimmer
+  [212653] = {
+    actionName = 'Blink',
+    actionID = 1953,
+  },
+  -- Sidewinders; have to assume arcane sadly
+  [214579] = {
+    actionName = 'Arcane Shot',
+    actionID = 185358,
+  },
+  -- Serenity
+  [152173] = {
+    actionName = 'Storm, Earth, and Fire',
+    actionID = 137639
+  }
+}
+
 
 -- This is needed to identify a spells that aren't reflected by GetCursorInfo()
 kb.OnPickupPetAction = function(slot, ...)
@@ -355,7 +374,7 @@
 
     if self.dynamicType == 'profession'  then
       if self.isAvailable then
-        self.statusText = '|cFFFFFF00Profession|r'
+        self.statusText = '|cFFFFFF00Profession Slot|r ' .. tostring(self.dynamicIndex) .. '-' .. tostring(self.dynamicSubIndex)
       else
 
         self.statusText = '|cFFFF4400'..PROFESSION_HEADERS[self.dynamicIndex]..'|r'