changeset 43:0f79d1118eb8

remove old names
author Nenue
date Tue, 16 Aug 2016 11:39:53 -0400
parents c77b355a0366
children a8ad93f50667
files LibKraken/LibKraken-1.0.lua LibKraken/LibKraken-1.0.xml SkeletonKey/DynamicTypes.lua
diffstat 3 files changed, 0 insertions(+), 771 deletions(-) [+]
line wrap: on
line diff
--- a/LibKraken/LibKraken-1.0.lua	Tue Aug 16 11:34:46 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,395 +0,0 @@
---[[
--- KrakynTools
--- AddOn prototyping library.
---
--- Implements
---  KT.register(frame) to hook the following (all optional):
---    frame:init()                            run immediately after KT sets itself up
---    frame:profile("Name-TruncatedRealm")    called the first time SavedVars data becomes available
---    frame:variables()                       called upon variables being available
---    frame:event(event, ...)                 replaces the event callback
---    frame:ui()                              called by /ui when activating
---
---    frame:tab(name, tooltip, texture, coord)
---      produces a serial button that changes display tabs
---
---    frame:button(name, text, tooltip, onClick)
---      produces a button with OnClick script
---
---    frame:uibutton(name, text, tooltip, onClick, texture, coord)
---      produces a header button with desired onClick
---
-]]--
-
-local LIBKT_MAJOR, LIBKT_MINOR = "LibKraken", 1
-local KT = LibStub:NewLibrary(LIBKT_MAJOR, LIBKT_MINOR)
-
---GLOBALS: LibKT, KrakTool, KTErrorFrame, LibKTError, SlashCmdList, SLASH_RL1, SLASH_UI1
-local CreateFrame, debugstack, tostring, select = CreateFrame, debugstack, tostring, select
-local print, max, unpack, tinsert = print, max, unpack, tinsert
-local ipairs, xpcall, next, safecall = ipairs, xpcall, next, safecall
-local UI_TOGGLE = false
-local db
-
-
-KT.handler = CreateFrame('Frame', 'LibKTHostFrame', UIParent)
-KT.addons = {}
-KT.initStack = {}
-KT.varsStack = {}
-local print = DEVIAN_WORKSPACE and function(...) print('LKT', ...) end or function() end
-local registeredHandles = {}
-
---- /rl
--- ReloadUI shortcut
-SLASH_RL1 = "/rl"
-SlashCmdList.RL = function ()
-  ReloadUI()
-end
-
---- /kv addon ...
--- Dumps table values from "addon", using the arguments as index values.
--- Numerics are converted, and names that end with "()" will be called as such
-SLASH_KV1 = "/kv"
-SlashCmdList.KV = function (editbox, input)
-
-end
-
-
---- /ui
--- Run any addon:ui() methods
-SLASH_UI1 = "/ui"
-SlashCmdList.UI = function ()
-  if UI_TOGGLE then
-    UI_TOGGLE = false
-  else
-    UI_TOGGLE = true
-  end
-  for i, frame in pairs(KT.frames) do
-    if UI_TOGGLE then
-      if frame.close then
-        frame.close()
-      else
-        frame:Hide()
-      end
-    else
-      if frame.ui then
-        frame.ui()
-      end
-      frame:Show()
-    end
-  end
-end
-
-LibKTError = function(msg)
-  local dstack = debugstack(2)
-  :gsub("Interface\\AddOns\\",'')
-  :gsub("<(.-)>", function(a) return '|cFF00FFFF<'.. a ..'>|r' end)
-
-
-
-  KTErrorFrame.errmsg:SetText(msg)
-  KTErrorFrame.debugstack:SetText(dstack)
-  KTErrorFrame:SetHeight(KTErrorFrame.debugstack:GetStringHeight() + KTErrorFrame.errmsg:GetStringHeight() + 12)
-  KTErrorFrame:Show()
-end
-
-
-local pending = {}
-local processing = false
-local isHandled = false
-local nodebug = false
-function KT.OnEvent (addon, event, ...)
-  if processing then
-    local args = {...}
-    C_Timer.After(0, function() KT.OnEvent(addon, event, unpack(args)) end)
-    return
-  else
-
-  end
-  --- reset state
-  processing = true
-  isHandled = false
-  nodebug = false
-
-
-  if addon.event then
-    nodebug = addon.event(addon, event, ...)
-  end
-
-  if addon[event] then
-    nodebug = addon[event](addon, event, ...) or nodebug
-    addon.missed = 0
-    addon.handled = addon.handled + 1
-    isHandled = true
-  else
-    addon.firstEvent = false
-    addon.unhandled = addon.unhandled + 1
-    addon.missed = addon.missed + 1
-  end
-
-  for i, module in ipairs(addon.modules) do
-    --print(i, module)
-    if module[event] then
-      nodebug = module[event](addon, event, ...) or nodebug
-      addon.missed = 0
-      addon.handled = addon.handled + 1
-      isHandled = true
-    else
-      addon.firstEvent = false
-      addon.unhandled = addon.unhandled + 1
-      addon.missed = addon.missed + 1
-    end
-
-  end
-  if nodebug then
-    processing = false
-    return
-  else
-    KT.UpdateEventStatus(addon, event, ...)
-    processing = false
-  end
-
-end
-
-KT.UpdateEventStatus = function(addon, event, ...)
-  print(addon:GetName(), event, ...)
-
-  -- debug outputs
-  if addon.status then
-    addon.status:SetText(event .. '\n|cFF00FF00' .. addon.handled .. '|r |cFFFF8800' .. addon.missed .. '|r |cFFFF4400' .. addon.unhandled .. '|r')
-    if isHandled then
-      addon.status:SetTextColor(0,1,0)
-      if addon.log then
-        local logtext = event
-        for i = 1, select('#',...) do
-          logtext = logtext .. '\n' .. i .. ':' .. tostring(select(i,...))
-        end
-        addon.log:SetText('|cFFFFFF00last|r\n' .. logtext)
-        local newWidth = addon.log:GetStringWidth()
-
-        if addon.logfirst then
-          if not addon.firstEvent then
-            addon.firstEvent = event
-            addon.logfirst:SetText('|cFF00FF88first|r\n' .. logtext)
-          end
-
-          newWidth = newWidth + addon.logfirst:GetStringWidth()
-        end
-        if addon.logdiff then
-          if not event ~= addon.firstEvent then
-            addon.firstEvent = event
-            addon.logdiff:SetText('|cFF0088FFdiff|r\n' .. logtext)
-          end
-          newWidth = newWidth + addon.logdiff:GetStringWidth()
-        end
-        --addon:SetWidth(newWidth)
-      end
-    else
-      addon.status:SetTextColor(1,0,0)
-    end
-  end
-end
-
-KT.register = function(addon, nameOrModule, noGUI)
-  local name
-  if registeredHandles[addon] then
-    if type(nameOrModule) == 'table' then
-      tinsert(addon.modules, nameOrModule)
-      name = debugstack(2,1,0):match(".+\\(%S+)%.lua")
-
-      print('auto-resolved module name', name, tostring(nameOrModule))
-    else
-      name = nameOrModule
-    end
-  else
-    if not nameOrModule then
-      assert(type(addon) == 'table', 'Need a valid table.')
-      if addon.GetName then
-        name = addon:GetName()
-      else
-        name = debugstack(2,1,0):match(".+AddOns\\(%S+)\\")
-        print('auto-resolved addon name', name, tostring(nameOrModule))
-      end
-      assert(type(name) == 'string', 'Unable to resolve a valid stub name.')
-    end
-    -- if calling again, assume name is a file handle
-
-    registeredHandles[addon] = name
-    KT.addons[name] = addon
-    if addon.SetScript then
-      addon:SetScript('OnEvent', KT.OnEvent)
-    end
-    addon.unhandled = 0
-    addon.missed = 0
-    addon.handled = 0
-    addon.firstEvent = false
-    addon.modules = {}
-    tinsert(KT.initStack, addon)
-    tinsert(KT.varsStack, addon)
-
-    if addon.GetName and (not noGUI) then
-      addon.UIPanelAnchor = {'TOPLEFT', addon, 'TOPLEFT', 12, -12 }
-      addon.UIPanelGrowth = {'TOPLEFT', 'TOPRIGHT', 14, 0}
-      addon.button = KT.button
-      addon.uibutton = KT.uibutton
-      addon.tab = KT.tab
-      addon.print = KT.print
-    end
-  end
-
-  return addon, (DEVIAN_WORKSPACE and function(...) _G.print(name, ...) end or function() end), KT.wrap
-end
-
-
-
-local onEvent = function(self, event, arg1)
-  if (event == 'ADDON_LOADED' and arg1 ~= 'Blizzard_DebugTools') or event == 'PLAYER_LOGIN' then
-    -- run any init blocks left in the queue
-    while #KT.initStack >= 1 do
-      local addon = tremove(KT.initStack, 1)
-      print('KT', addon:GetName(), 'init')
-      if addon.init then
-        xpcall(addon.init, LibKTError)
-        for i, module in ipairs(addon.modules) do
-          if module.init then
-            xpcall(module.init, LibKTError)
-          end
-        end
-      end
-    end
-
-    -- run any variables blocks if player variables are ready 
-    if IsLoggedIn() and #KT.varsStack >= 1 then
-      while #KT.varsStack >= 1 do
-        local addon = tremove(KT.varsStack, 1)
-        print(addon:GetName())
-        if addon.variables then
-          xpcall(addon.variables, LibKTError)
-          for i, module in ipairs(addon.modules) do
-            if module.variables then
-              xpcall(module.variables, LibKTError)
-            end
-          end
-        end
-      end
-    end
-  end
-end
-
-KT.print = function(module, ...)
-  local msg = '|cFF00FFFF'..module:GetName()..'|r:'
-  for i = 1, select('#', ...) do
-    msg = msg .. ' ' .. tostring(select(i, ...))
-  end
-  DEFAULT_CHAT_FRAME:AddMessage(msg)
-end
-
---- Button generators
-
-local GetButtonTemplate = function(name, parent, template, onClick)
-  if _G[name] then
-    return _G[name]
-  end
-
-  local button = CreateFrame('Button', name, parent, template)
-  button:RegisterForClicks('AnyUp')
-  button:SetScript('OnClick', onClick)
-  return button
-end
-
-local SetButtonAnchor = function(self, collector, anchor, growth)
-  if self:GetID() == 0 then
-    self:SetID(#collector)
-    print('registered TabButton #', self:GetID())
-  end
-
-  if self:GetID() == 1 then
-    self:SetPoint(unpack(anchor))
-  else
-    growth[2] = collector[self:GetID()-1]
-    self:SetPoint(unpack(growth))
-  end
-end
-
-KT.tab = function(self, name, tooltip, texture, coords)
-  local button = GetButtonTemplate(name, self,  'KTTabButton', self.SelectTab)
-  button.icon:SetTexture(texture)
-  button.tooltip = tooltip
-  button:SetSize(unpack(self.tabSize))
-  if coords then
-    button.icon:SetTexCoord(unpack(coords))
-  end
-  SetButtonAnchor(button, self.tabButtons, self.tabAnchor, self.tabGrowth)
-  return button
-end
-
-KT.button = function(self, name, text, tooltip, onClick)
-  local button = GetButtonTemplate(name, self, 'KTButton', onClick)
-
-  button.tooltip = tooltip
-  button:SetText(text)
-  button:SetWidth(max(button:GetWidth(), button:GetFontString():GetStringWidth() + 12))
-
-  SetButtonAnchor(button, self.controls, self.controlsAnchor, self.controlsGrowth)
-  return button
-end
-
-KT.uibutton = function(self, name, text, tooltip, onClick, texture, coords)
-  local button = GetButtonTemplate(name, self, 'KTUIPanelButton', onClick)
-
-  button.tooltip = tooltip
-  button:SetText(text)
-
-  if self.UIPanelIcon then
-    local w, h, anchor, x, y = unpack(self.UIPanelIcon)
-    button.icon:SetTexture(texture)
-    button.icon:SetSize(w, h)
-    button.icon:ClearAllPoints()
-    button.icon:SetPoint(anchor, button, anchor, x, y)
-  end
-
-  if not self.UIPanelSize then
-    button:SetWidth(button:GetFontString():GetStringWidth() + button.icon:GetWidth()/1.5)
-  else
-    button:SetSize(unpack(self.UIPanelSize))
-  end
-  if coords then
-    button.icon:SetTexCoord(unpack(coords))
-  end
-  SetButtonAnchor(button, self.UIPanels, self.UIPanelAnchor, self.UIPanelGrowth)
-  return button
-end
-
---- Co-routine Handler kajigger
-do
-  local tickerQueue = {}
-  local ticker
-  local instant = false
-  KT.tick = function()
-
-    if #tickerQueue == 0 then
-      ticker:Cancel()
-      ticker = nil
-    end
-    local func = tremove(tickerQueue, 1)
-    if func then
-      --print('#', #tickerQueue)
-      func()
-    end
-  end
-
-  KT.wrap = function(f)
-    if not ticker then
-      --print('create ticker')
-      ticker = C_Timer.NewTicker(.001, KT.tick)
-    end
-    tinsert(tickerQueue, f)
-
-    return #tickerQueue
-
-  end
-end
-
-KT.handler:RegisterEvent('ADDON_LOADED')
-KT.handler:RegisterEvent('PLAYER_LOGIN')
-KT.handler:SetScript('OnEvent', onEvent)
\ No newline at end of file
--- a/LibKraken/LibKraken-1.0.xml	Tue Aug 16 11:34:46 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-
-  <Script file="LibKraken-1.0.lua" />
-
-  <Font name="KTLogString" font="Fonts\ARIALN.TTF" height="12" justifyH="LEFT" justifyV="TOP" inherits="NumberFontNormal" virtual="true">
-    <Color a="1" r="1" g="1" b="1" />
-  </Font>
-
-  <Font name="KTHeaderFont" height="18" justifyH="LEFT" justifyV="TOP" virtual="true" inherits="NumberFont_Outline_Huge" />
-  <Font name="KTHeader2Font" height="14" font="Fonts\skurri.ttf" outline="NORMAL" justifyH="LEFT" justifyV="TOP" virtual="true" />
-  <Font name="KTUIPanelFont" justifyH="LEFT" virtual="true"  inherits="NumberFontNormal"  />
-  <Font name="KTMacroButtonFont" height="12" font="Fonts\ARIALN.TTF" justifyH="LEFT" virtual="true" >
-    <Color a="1" r="1" g="1" b="1" />
-  </Font>
-
-
-  <Button name="KTButton" parentArray="controls" virtual="true">
-    <Size x="72" y="28" />
-    <Scripts>
-      <OnEnter>
-        if self.tooltip then
-          GameTooltip:SetOwner(self)
-          GameTooltip:SetAnchorType('ANCHOR_TOPRIGHT')
-          GameTooltip:SetText(self.tooltip)
-          GameTooltip:Show()
-        end
-      </OnEnter>
-      <OnLeave>
-        GameTooltip:Hide()
-      </OnLeave>
-    </Scripts>
-    <NormalFont style="NumberFontNormal" />
-    <NormalTexture setAllPoints="true">
-      <Color a="1" r="0" g=".4" b="1" />
-    </NormalTexture>
-    <DisabledTexture>
-      <Color a="1" r="0.5" b="0.5" g="0.5" />
-    </DisabledTexture>
-    <DisabledColor a="0.5" r="1" g="1" b="1" />
-    <PushedTexture>
-      <Color a="1" r="1" g="0.25" b="0.25" />
-    </PushedTexture>
-    <HighlightTexture alphaMode="ADD">
-      <Color a="0.25" r="1" g="0" b=".5" />
-    </HighlightTexture>
-  </Button>
-
-  <!-- style for Blizzard UIPanel activators
-    // The template anchor gets overwritten for successive iterations -->
-  <Button name="KTUIPanelButton" virtual="true" parentArray="UIPanels">
-    <Size x="84" y="24" />
-    <Scripts>
-      <OnEnter>
-        if self.tooltip then
-          GameTooltip:SetOwner(self)
-          GameTooltip:SetAnchorType('ANCHOR_TOPRIGHT')
-          GameTooltip:SetText(self.tooltip)
-          GameTooltip:Show()
-        end
-      </OnEnter>
-      <OnLeave>
-        GameTooltip:Hide()
-      </OnLeave>
-    </Scripts>
-    <Layers>
-      <Layer level="OVERLAY">
-        <Texture parentKey="icon" />
-      </Layer>
-    </Layers>
-
-    <ButtonText>
-      <Anchors>
-        <Anchor point="LEFT" x="14" y="0" />
-      </Anchors>
-    </ButtonText>
-
-    <NormalFont style="KTUIPanelFont" />
-    <NormalTexture>
-      <Color a="1" r=".24" g=".24" b=".24" />
-    </NormalTexture>
-    <PushedTexture>
-      <Color a="1" r="0" g="0" b="0" />
-    </PushedTexture>
-    <HighlightTexture alphaMode="ADD">
-      <Size x="32" />
-      <Color a="1" r="1" g="1" b="1" />
-      <Gradient orientation="HORIZONTAL">
-        <MaxColor r=".25" g=".25" b=".25"/>
-        <MinColor  r="0" g="0" b="0" />
-      </Gradient>
-    </HighlightTexture>
-
-  </Button>
-
-  <Button name="KTTabButton" virtual="true" parentArray="tabButtons">
-    <Scripts>
-      <OnEnter>
-
-        if not self.tooltip then
-          return
-        end
-        GameTooltip:SetOwner(self)
-        GameTooltip:SetAnchorType('LEFT')
-        GameTooltip:SetText(self.tooltip)
-        GameTooltip:Show()
-      </OnEnter>
-      <OnLeave>
-
-        if not self.tooltip then
-          return
-        end
-        GameTooltip:Hide()
-      </OnLeave>
-    </Scripts>
-    <Size x="40" y="40" />
-    <Layers>
-      <Layer level="BACKGROUND">
-        </Layer>
-      <Layer level="BORDER">
-        <Texture parentKey="icon">
-          <Color a="1" r="1" g="0" b="0" />
-          <Anchors>
-            <Anchor point="TOPLEFT" x="2" y="-2"/>
-            <Anchor point="BOTTOMRIGHT" x="-2" y="2"/>
-          </Anchors>
-        </Texture>
-      </Layer>
-      <Layer level="ARTWORK">
-      </Layer>
-    </Layers>
-
-    <NormalTexture name="$parentNormalTexture" file="Interface\Buttons\UI-Quickslot2">
-      <Anchors>
-        <Anchor point="TOPLEFT" x="-12" y="12"/>
-        <Anchor point="BOTTOMRIGHT" x="13" y="-13"/>
-      </Anchors>
-    </NormalTexture>
-    <PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
-    <HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
-  </Button>
-
-  <!-- inherited to generate event feedback -->
-  <Frame name="KTDebugTemplate" virtual="true">
-    <Layers>
-      <Layer level="OVERLAY">
-        <FontString inherits="GameFontNormal" parentKey="status" text="text thing here">
-          <Anchors>
-            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
-          </Anchors>
-        </FontString>
-        <FontString inherits="KTLogString" parentKey="logfirst" text="First">
-          <Anchors>
-            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" x="0" y="0" relativeKey="$parent.status" />
-          </Anchors>
-        </FontString>
-        <FontString inherits="KTLogString" parentKey="logdiff" text="Different">
-          <Anchors>
-            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeKey="$parent.logfirst" />
-          </Anchors>
-        </FontString>
-        <FontString inherits="KTLogString" parentKey="log" text="Last">
-          <Anchors>
-            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeKey="$parent.logdiff" />
-          </Anchors>
-        </FontString>
-      </Layer>
-    </Layers>
-  </Frame>
-
-
-
-  <Frame name="KTErrorFrame" parent="UIParent" toplevel="true" movable="true" enableMouse="true" hidden="true" clampedToScreen="true">
-    <Size x="450" y="280" />
-    <Anchors>
-      <Anchor point="CENTER" />
-    </Anchors>
-    <Scripts>
-      <OnLoad>
-        self:RegisterForDrag('LeftButton')
-      </OnLoad>
-      <OnDragStart>
-        self:StartMoving()
-      </OnDragStart>
-      <OnDragStop>
-        self:StopMovingOrSizing()
-      </OnDragStop>
-    </Scripts>
-    <Layers>
-      <Layer level="BACKGROUND">
-        <Texture setAllPoints="true">
-          <Color a="1" r="0" g="0" b="0" />
-        </Texture>
-      </Layer>
-      <Layer level="OVERLAY">
-        <FontString inherits="NumberFont_Outline_Huge" text="KrakTool Error">
-          <Anchors>
-            <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" />
-          </Anchors>
-        </FontString>
-        <FontString inherits="NumberFont_Outline_Large" parentKey="errmsg" justifyH="LEFT" spacing="3">
-          <Anchors>
-            <Anchor point="TOP" />
-            <Anchor point="LEFT" />
-            <Anchor point="RIGHT" />
-          </Anchors>
-        </FontString>
-        <FontString inherits="NumberFont_Outline_Large" parentKey="debugstack" justifyH="LEFT" spacing="3">
-          <Anchors>
-            <Anchor point="LEFT" />
-            <Anchor point="RIGHT" />
-            <Anchor point="TOP" relativePoint="BOTTOM" relativeKey="$parent.errmsg" x="0" y="-8" />
-          </Anchors>
-        </FontString>
-      </Layer>
-    </Layers>
-  </Frame>
-</Ui>
\ No newline at end of file
--- a/SkeletonKey/DynamicTypes.lua	Tue Aug 16 11:34:46 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
--- KrakTool
--- DynamicTypes.lua
--- Created: 7/28/2016 3:28 PM
--- %file-revision%
--- Logic related to dynamic handlers
-local kb, print = LibStub('LibKraken').register(KeyBinder, 'PlayerInfo')
-
-local PET_SPECIAL_SUBTEXT = 'Special Ability'
-local SECONDARY_PROFESSIONS = {
-  [5] = 3,
-  [7] = 4,
-  [9] = 5,
-  [10] = 6
-}
-
-kb.TalentCache = {}
-kb.ProfessionCache = {}
-kb.PetCache = {}
-kb.specInfo = {}
-kb.UpdateSpecInfo = function()
-  kb.specInfo.id = GetSpecialization()
-  kb.specInfo.globalID, kb.specInfo.name, kb.specInfo.desc, kb.specInfo.texture = GetSpecializationInfo(kb.specInfo.id)
-  print('|cFF00FF00current spec:|r', kb.specInfo.id, 'of', GetNumSpecializations())
-end
-
-kb.UpdateTalentInfo = function()
-  if kb.talentsPushed then
-    return
-  end
-  table.wipe(kb.TalentCache)
-  for row =1, MAX_TALENT_TIERS do
-    for col = 1, NUM_TALENT_COLUMNS do
-      local talentID, talentName, icon, selected, available, spellID = GetTalentInfo(row, col, 1)
-      local talentInfo = kb.TalentCache[spellID] or {}
-      talentInfo.row = 1
-      talentInfo.col = col
-      talentInfo.name = talentName
-      talentInfo.talentID = talentID
-      talentInfo.selected = selected
-      talentInfo.available = available
-      talentInfo.spellID = spellID
-      kb.TalentCache[spellID] = talentInfo
-      kb.TalentCache[talentName] = talentInfo
-      print('Talent ', row, col, spellID, talentName)
-    end
-  end
-  kb.talentsPushed = true
-
-  kb.UpdateDynamicButtons('talent')
-end
-
-kb.UpdateProfessionInfo = function()
-  table.wipe(kb.ProfessionCache)
-  local profs = {GetProfessions() }
-  local primaryNum = 0
-  for i, index in ipairs(profs) do
-    local profName, texture, rank, maxRank, numSpells, spellOffset = GetProfessionInfo(index)
-    print(i, index, profName, numSpells, spellOffset)
-    if not SECONDARY_PROFESSIONS[index] then
-      primaryNum = primaryNum + 1
-    end
-    local profNum = SECONDARY_PROFESSIONS[index] or primaryNum
-
-
-    kb.ProfessionCache[profNum] = kb.ProfessionCache[i] or {}
-
-    for j = 1, numSpells do
-      local spellName, _, icon, _, _, _, spellID = GetSpellInfo(spellOffset+j, BOOKTYPE_PROFESSION)
-
-      local profInfo = {
-        spellName = spellName,
-        spellID = spellID,
-        icon = icon,
-        profOffset = i,
-        profIndex = index,
-        spellOffset = (spellOffset+j),
-        spellNum = j
-      }
-      KeyBinderKey:SetAttribute("*type-profession_"..i .. '_' ..j, "spell")
-      KeyBinderKey:SetAttribute("*spell-profession_"..i .. '_' ..j, spellName)
-
-      kb.ProfessionCache[i .. '_' .. j] = profInfo
-      kb.ProfessionCache[spellName] = profInfo
-      kb.ProfessionCache[spellID] = profInfo
-      print('  |cFF0088FF['..i..']|r|cFFFF44BB['..spellOffset+i..']|r', spellName, "profession_"..i .. '_' ..j)
-    end
-
-  end
-
-  kb.UpdateDynamicButtons('profession')
-end
-
-
-
-kb.UpdatePetInfo = function()
-  kb.PetCache.spell = kb.PetCache.spell or {}
-  kb.PetCache.spellslot = kb.PetCache.spellslot or {}
-  kb.PetCache.action = kb.PetCache.action or {}
-  kb.PetCache.special = kb.PetCache.action or {}
-  local hasPetSpells, petType = HasPetSpells()
-  if PetHasSpellbook() then
-    print('PET SPELLBOOK')
-    local i = 1
-    local specialNum = 0
-    repeat
-
-      local spellType, spellID = GetSpellBookItemInfo(i, BOOKTYPE_PET)
-      local spellName, subText = GetSpellBookItemName(i, BOOKTYPE_PET)
-      local isPassive = IsPassiveSpell(i, BOOKTYPE_PET)
-      if not isPassive then
-        if spellName then
-          kb.PetCache.spellslot[spellName] = {i, spellName, subText}
-          print('|cFF00FF88spellslot['..spellName..']|r', '=>', i, subText)
-
-          if subText == PET_SPECIAL_SUBTEXT then
-            specialNum = specialNum + 1
-            kb.PetCache.special[spellName] = {i, specialNum, spellID, subText }
-            print('|cFF00FFFFspecial['..spellName..']|r', '=>', i, specialNum, spellID, subText)
-          end
-
-          if spellID then
-            kb.PetCache.spell[i] = {spellID, spellName, subText}
-            print('|cFF0088FFspell['..i..']|r', '=>', spellID, spellName, subText)
-          end
-        end
-
-
-      end
-
-      i = i + 1
-    until spellType == nil
-  else
-    print('NO PET SPELLBOOK')
-    table.wipe(kb.PetCache.spell)
-    table.wipe(kb.PetCache.spellslot)
-  end
-
-  if PetHasActionBar() then
-    print('PET ACTION BAR')
-    for i = 1, 10 do
-
-
-      local name, subtext, texture, isToken, isActive = GetPetActionInfo(i)
-      if name then
-        kb.PetCache.action[i] = {name, subtext, texture, isToken, isActive }
-
-
-      end
-      print('|cFFFFFF00action['..i..']|r', name, subtext, texture)
-    end
-  else
-    print('NO PET ACTION BAR')
-    table.wipe(kb.PetCache.action)
-  end
-
-  kb.UpdateDynamicButtons('petaction')
-
-end
-
-kb.SystemBinds = {}
-kb.UpdateSystemBinds = function()
-  table.wipe(kb.SystemBinds)
-  local n = GetNumBindings()
-  for i=1, n do
-    local command, key1, key2 = GetBinding(i)
-    if key1 then
-      kb.SystemBinds[key1] = command
-    end
-    if key2 then
-      kb.SystemBinds[key2] = command
-    end
-  end
-
-end
-
-kb.UpdateDynamicButtons = function(dynamicType)
-  for i, button in ipairs(kb.buttons) do
-    if button.isDynamic == dynamicType then
-      kb.UpdateSlot(button, true)
-    end
-  end
-end
\ No newline at end of file