Mercurial > wow > skeletonkey
view SkeletonKey/Events.lua @ 64:178d489f387c
- fix wrong attribute names being used for macros bound from a previous profile
author | Nenue |
---|---|
date | Fri, 09 Sep 2016 11:40:53 -0400 |
parents | 04c23ceaf9e0 |
children |
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, print = LibStub("LibKraken").register(KeyBinder) kb.init = function() kb:RegisterEvent('PLAYER_ENTERING_WORLD') kb:RegisterEvent('UPDATE_MACROS') kb:RegisterEvent('UPDATE_BINDINGS') kb:RegisterUnitEvent('PLAYER_SPECIALIZATION_CHANGED', 'player', 'pet') kb:RegisterUnitEvent('UNIT_PORTRAIT_UPDATE', 'player', 'pet') kb:RegisterUnitEvent('SPELLS_CHANGED') kb:RegisterUnitEvent('TALENT_UPDATE', 'player', 'pet') kb:RegisterEvent('PLAYER_REGEN_DISABLED') kb:RegisterEvent('PLAYER_REGEN_ENABLED') end kb.PLAYER_REGEN_DISABLED = function() kb:Hide() end kb.UNIT_PORTRAIT_UPDATE = function() if KeyBinderCharacterTab then SetPortraitTexture(KeyBinderCharacterTab.icon, 'player') end end kb.PLAYER_REGEN_ENABLED = function() kb.ui() end kb.PLAYER_SPECIALIZATION_CHANGED = function(...) kb.UpdateSpecInfo() kb.UpdateTalentInfo() kb.SelectProfileSet(kb.profileName) kb.ApplyAllBindings() kb.ui(true) end kb.PLAYER_TALENT_UPDATE = function() kb.UpdateTalentInfo() kb.SelectProfileSet(kb.profileName) kb.ApplyAllBindings() kb.ui() end kb.ACTIONBAR_SLOT_CHANGED = function(self, event, slot) --kb.HotKeyText(slot) return true end -- only need to respond to this for pet actions kb.SPELLS_CHANGED = function(self, event, unit) print('|cFFFF0088'.. event..'|r', unit) kb.UpdatePetInfo() end kb.UPDATE_MACROS = function() kb.UpdateMacroInfo() end kb.UPDATE_BINDINGS = function() kb.UpdateSystemBinds() end