view Events.lua @ 80:b9a53385462c

- 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 Nick@Zahhak
date Tue, 21 Mar 2017 02:23:23 -0400
parents d4c100b0fd01
children 73810564e4b8
line wrap: on
line source
-- KrakTool
-- Events.lua
-- Created: 7/24/2016 11:10 PM
-- %file-revision%
-- Event handlers, and the init block that sets them up; nothing else should be here

local _, kb = ...
local print = (DEVIAN_PNAME == 'SkeletonKey') and function(...) _G.print('SkeletonKey', ...) end or function() end


kb.PLAYER_LOGIN = function(_, _, addon)

end

kb.PLAYER_REGEN_DISABLED = function()
  SkeletonKey:SetShown(false)
end

kb.UNIT_PORTRAIT_UPDATE = function()
  SkeletonKey:Update()
end

kb.PLAYER_REGEN_ENABLED = function()
  SkeletonKey:SetShown(kb.db.showUI)
end
kb.ACTIONBAR_SLOT_CHANGED = function(self, event, slot)
  --kb.HotKeyText(slot)
  return true
end


kb.PLAYER_TALENT_UPDATE = function()
  kb.TalentsChanged = true
end
kb.PLAYER_PVP_TALENT_UPDATE = kb.PLAYER_TALENT_UPDATE

-- only need to respond to this for pet actions
kb.PLAYER_SPECIALIZATION_CHANGED = function(self, event, unit)
  kb.talentsPushed = nil
  kb.UpdateSpecInfo()
  kb.UpdateTalentInfo()
  kb.UpdatePetInfo()
  kb.SelectProfileSet(kb.profileName)
  kb.ApplyAllBindings()
  SkeletonKey:Update(true)
end

kb.SPELLS_CHANGED = function()
  SkeletonKey:Update()
end

kb.UPDATE_MACROS = function()
  kb.UpdateMacroInfo()
end

kb.UPDATE_BINDINGS = function()
  kb.UpdateSystemBinds()
end