changeset 91:5005aecc2dc8 v8.0.1b

more 8.0.1 fire spotting
author Nenue
date Tue, 17 Jul 2018 20:47:59 -0400
parents 73810564e4b8
children c1c9dd6063a8
files KeyButton.lua SkeletonKey.xml
diffstat 2 files changed, 72 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/KeyButton.lua	Tue Jul 17 16:18:31 2018 -0400
+++ b/KeyButton.lua	Tue Jul 17 20:47:59 2018 -0400
@@ -202,91 +202,93 @@
     local name, icon, _, macroName, macroText
     local pickupID, pickupBook
 
-    if actionType == 'spell' then
-      local realName = GetSpellInfo(subData)
-      name, _, icon, _, _, _, actionID = GetSpellInfo(subData)
+      if actionType == 'spell' then
+        local realName = GetSpellInfo(subData)
+        name, _, icon, _, _, _, actionID = GetSpellInfo(subData)
 
-      if TALENT_SPELLS[actionID] then
-        name = TALENT_SPELLS[actionID].actionName
-        actionID  = TALENT_SPELLS[actionID].actionID
-        icon = TALENT_SPELLS[actionID].icon
-    elseif actionType == 'macro' then
-      name, icon, macroText = GetMacroInfo(actionID)
-      macroName = name
-    elseif actionType == 'petaction' then
-      if CURSOR_SPELLSLOT and CURSOR_BOOKTYPE then
+        if TALENT_SPELLS[actionID] then
+          name = TALENT_SPELLS[actionID].actionName
+          actionID  = TALENT_SPELLS[actionID].actionID
+          icon = TALENT_SPELLS[actionID].icon
+      elseif actionType == 'macro' then
+        name, icon, macroText = GetMacroInfo(actionID)
+        macroName = name
+      elseif actionType == 'petaction' then
+        if CURSOR_SPELLSLOT and CURSOR_BOOKTYPE then
 
-        local spellType, spellID = GetSpellBookItemInfo(CURSOR_SPELLSLOT, CURSOR_BOOKTYPE)
-        local spellName, spellText = GetSpellBookItemName(CURSOR_SPELLSLOT, CURSOR_BOOKTYPE)
-        if spellType == 'PETACTION' then
-          name = spellName
-          actionID = spellText
-          icon = CURSOR_TEXTURE
+          local spellType, spellID = GetSpellBookItemInfo(CURSOR_SPELLSLOT, CURSOR_BOOKTYPE)
+          local spellName, spellText = GetSpellBookItemName(CURSOR_SPELLSLOT, CURSOR_BOOKTYPE)
+          if spellType == 'PETACTION' then
+            name = spellName
+            actionID = spellText
+            icon = CURSOR_TEXTURE
+          else
+            name, _, icon = GetSpellInfo(spellID)
+            actionID = spellID
+          end
+
+          pickupID = CURSOR_SPELLSLOT
+          pickupBook = CURSOR_BOOKTYPE
         else
-          name, _, icon = GetSpellInfo(spellID)
-          actionID = spellID
+
+
         end
 
-        pickupID = CURSOR_SPELLSLOT
-        pickupBook = CURSOR_BOOKTYPE
-      else
+      elseif actionType == 'mount' then
+        if subType == 0 then
+          name, _, icon = GetSpellInfo(SUMMON_RANDOM_FAVORITE_MOUNT_SPELL)
+          actionID = 0
+        else
+          name, _, icon = GetMountInfoByID(actionID)
+        end
+      elseif actionType == 'item' then
+        name = GetItemInfo(actionID)
+        icon = GetItemIcon(actionID)
+      elseif actionType == 'battlepet' then
 
+        local speciesID, customName, level, xp, maxXp, displayID, isFavorite, petName, petIcon, petType, creatureID = GetPetInfoByPetID(actionID)
+        name = customName or petName
+        icon = petIcon
 
       end
+      local _, macroBody, command = kb.RegisterAction(actionType, actionID, name)
+      local slotInfo = {
+        command = command,
+        actionName = name,
+        iconPath = icon,
+        actionType = actionType,
+        actionID = actionID,
+        macroName = macroName,
+        macroText = macroText or macroBody,
+        spellbookSlot = pickupID,
+        spellbookType = pickupBook,
+        assignedKeys = {GetBindingKey(command)}
+      }
 
-    elseif actionType == 'mount' then
-      if subType == 0 then
-        name, _, icon = GetSpellInfo(SUMMON_RANDOM_FAVORITE_MOUNT_SPELL)
-        actionID = 0
+      local isAssigned, isBound, assignedBy, boundBy = kb.IsCommandBound(self, command)
+      if isAssigned then
+        local popup = StaticPopupDialogs["SKELETONKEY_CONFIRM_ASSIGN_SLOT"]
+        popup.slot = self
+        popup.text = "Currently assigned in |cFFFFFF00"..tostring(kb.configHeaders[assignedBy]).."|r. Are you sure?"
+        popup.oldProfile = assignedBy
+        popup.args = {slotInfo}
+        SkeletonKey:SetScript('OnMouseWheel', nil) -- disable scrolling
+        StaticPopup_Show('SKELETONKEY_CONFIRM_ASSIGN_SLOT')
       else
-        name, _, icon = GetMountInfoByID(actionID)
+        kb.currentProfile.buttons[self:GetID()] = slotInfo
+        kb.LoadBinding(slotInfo)
+        self:SetSlot(slotInfo)
+        self:UpdateSlot()
+        self.active = nil
+        ClearCursor()
+        ResetCursor()
       end
-    elseif actionType == 'item' then
-      name = GetItemInfo(actionID)
-      icon = GetItemIcon(actionID)
-    elseif actionType == 'battlepet' then
-
-      local speciesID, customName, level, xp, maxXp, displayID, isFavorite, petName, petIcon, petType, creatureID = GetPetInfoByPetID(actionID)
-      name = customName or petName
-      icon = petIcon
-
-    end
-    local _, macroBody, command = kb.RegisterAction(actionType, actionID, name)
-    local slotInfo = {
-      command = command,
-      actionName = name,
-      iconPath = icon,
-      actionType = actionType,
-      actionID = actionID,
-      macroName = macroName,
-      macroText = macroText or macroBody,
-      spellbookSlot = pickupID,
-      spellbookType = pickupBook,
-      assignedKeys = {GetBindingKey(command)}
-    }
-
-    local isAssigned, isBound, assignedBy, boundBy = kb.IsCommandBound(self, command)
-    if isAssigned then
-      local popup = StaticPopupDialogs["SKELETONKEY_CONFIRM_ASSIGN_SLOT"]
-      popup.slot = self
-      popup.text = "Currently assigned in |cFFFFFF00"..tostring(kb.configHeaders[assignedBy]).."|r. Are you sure?"
-      popup.oldProfile = assignedBy
-      popup.args = {slotInfo}
-      SkeletonKey:SetScript('OnMouseWheel', nil) -- disable scrolling
-      StaticPopup_Show('SKELETONKEY_CONFIRM_ASSIGN_SLOT')
-    else
-      kb.currentProfile.buttons[self:GetID()] = slotInfo
-      kb.LoadBinding(slotInfo)
-      self:SetSlot(slotInfo)
-      self:UpdateSlot()
-      self.active = nil
-      ClearCursor()
-      ResetCursor()
     end
   end
 end
 
 
+
 do
   local PickupAction = {
     spell = _G.PickupSpell,
--- a/SkeletonKey.xml	Tue Jul 17 16:18:31 2018 -0400
+++ b/SkeletonKey.xml	Tue Jul 17 20:47:59 2018 -0400
@@ -326,7 +326,7 @@
     </Frames>
   </CheckButton>
 
-  <Frame name="$parentActionList" mixin="SkeletonKeyActionListMixin">
+  <Frame parent="SkeletonKey" name="$parentActionList" mixin="SkeletonKeyActionListMixin" parentArray="Panels">
     <Scripts>
       <OnLoad method="OnLoad" />
       <OnShow method="OnShow" />