Mercurial > wow > skeletonkey
diff Events.lua @ 70:131d9190db6b
Curseforge migration
author | Nenue |
---|---|
date | Wed, 28 Dec 2016 16:31:15 -0500 |
parents | |
children | c48913c5924c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Events.lua Wed Dec 28 16:31:15 2016 -0500 @@ -0,0 +1,60 @@ +-- 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.ADDON_LOADED = function(_, _, addon) + + if addon == 'Blizzard_MacroUI' then + kb.CreateMacroHooks() + end +end + +kb.PLAYER_REGEN_DISABLED = function() + SkeletonKey:SetShown(false) +end + +kb.UNIT_PORTRAIT_UPDATE = function() + SkeletonKey:Update() +end + +kb.PLAYER_REGEN_ENABLED = function() + SkeletonKey:Update() +end + +kb.PLAYER_SPECIALIZATION_CHANGED = function(...) + kb.UpdateSpecInfo() + kb.UpdateTalentInfo() + kb.SelectProfileSet(kb.profileName) + kb.ApplyAllBindings() + SkeletonKey:Update(true) +end +kb.PLAYER_TALENT_UPDATE = function() + kb.UpdateTalentInfo() + kb.SelectProfileSet(kb.profileName) + kb.ApplyAllBindings() + SkeletonKey:Update() +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 \ No newline at end of file