comparison Events.lua @ 70:131d9190db6b

Curseforge migration
author Nenue
date Wed, 28 Dec 2016 16:31:15 -0500
parents
children c48913c5924c
comparison
equal deleted inserted replaced
69:b14d0611c8d9 70:131d9190db6b
1 -- KrakTool
2 -- Events.lua
3 -- Created: 7/24/2016 11:10 PM
4 -- %file-revision%
5 -- Event handlers, and the init block that sets them up; nothing else should be here
6
7 local _, kb = ...
8 local print = (DEVIAN_PNAME == 'SkeletonKey') and function(...) _G.print('SkeletonKey', ...) end or function() end
9
10
11 kb.ADDON_LOADED = function(_, _, addon)
12
13 if addon == 'Blizzard_MacroUI' then
14 kb.CreateMacroHooks()
15 end
16 end
17
18 kb.PLAYER_REGEN_DISABLED = function()
19 SkeletonKey:SetShown(false)
20 end
21
22 kb.UNIT_PORTRAIT_UPDATE = function()
23 SkeletonKey:Update()
24 end
25
26 kb.PLAYER_REGEN_ENABLED = function()
27 SkeletonKey:Update()
28 end
29
30 kb.PLAYER_SPECIALIZATION_CHANGED = function(...)
31 kb.UpdateSpecInfo()
32 kb.UpdateTalentInfo()
33 kb.SelectProfileSet(kb.profileName)
34 kb.ApplyAllBindings()
35 SkeletonKey:Update(true)
36 end
37 kb.PLAYER_TALENT_UPDATE = function()
38 kb.UpdateTalentInfo()
39 kb.SelectProfileSet(kb.profileName)
40 kb.ApplyAllBindings()
41 SkeletonKey:Update()
42 end
43 kb.ACTIONBAR_SLOT_CHANGED = function(self, event, slot)
44 --kb.HotKeyText(slot)
45 return true
46 end
47
48 -- only need to respond to this for pet actions
49 kb.SPELLS_CHANGED = function(self, event, unit)
50 print('|cFFFF0088'.. event..'|r', unit)
51 kb.UpdatePetInfo()
52 end
53
54 kb.UPDATE_MACROS = function()
55 kb.UpdateMacroInfo()
56 end
57
58 kb.UPDATE_BINDINGS = function()
59 kb.UpdateSystemBinds()
60 end