annotate Events.lua @ 76:6623b7f2c1ca v7.1.5-78-release

Added: - key assignment and unbinding for inactive talents Bug Fixes: - fixed spell access check for talents - fixed detection of Legion PvP talents - fixed unbind command not clearing assigned key text - fixed frame content not loading after combat Miscellaneous: - bindings are determined from the button's assignment list - increment profile version to remove deprecated talents list
author Nenue
date Mon, 23 Jan 2017 20:07:30 -0500
parents e75a2fd448c0
children d4c100b0fd01
rev   line source
Nenue@70 1 -- KrakTool
Nenue@70 2 -- Events.lua
Nenue@70 3 -- Created: 7/24/2016 11:10 PM
Nenue@70 4 -- %file-revision%
Nenue@70 5 -- Event handlers, and the init block that sets them up; nothing else should be here
Nenue@70 6
Nenue@70 7 local _, kb = ...
Nenue@70 8 local print = (DEVIAN_PNAME == 'SkeletonKey') and function(...) _G.print('SkeletonKey', ...) end or function() end
Nenue@70 9
Nenue@70 10
Nenue@72 11 kb.PLAYER_LOGIN = function(_, _, addon)
Nenue@70 12
Nenue@70 13 end
Nenue@70 14
Nenue@70 15 kb.PLAYER_REGEN_DISABLED = function()
Nenue@70 16 SkeletonKey:SetShown(false)
Nenue@70 17 end
Nenue@70 18
Nenue@70 19 kb.UNIT_PORTRAIT_UPDATE = function()
Nenue@70 20 SkeletonKey:Update()
Nenue@70 21 end
Nenue@70 22
Nenue@70 23 kb.PLAYER_REGEN_ENABLED = function()
Nenue@74 24 SkeletonKey:SetShown(kb.db.showUI)
Nenue@70 25 end
Nenue@70 26 kb.ACTIONBAR_SLOT_CHANGED = function(self, event, slot)
Nenue@70 27 --kb.HotKeyText(slot)
Nenue@70 28 return true
Nenue@70 29 end
Nenue@70 30
Nenue@76 31
Nenue@74 32 kb.PLAYER_TALENT_UPDATE = function()
Nenue@74 33 kb.TalentsChanged = true
Nenue@74 34 end
Nenue@76 35 kb.PLAYER_PVP_TALENT_UPDATE = kb.PLAYER_TALENT_UPDATE
Nenue@74 36
Nenue@70 37 -- only need to respond to this for pet actions
Nenue@74 38 kb.PLAYER_SPECIALIZATION_CHANGED = function(self, event, unit)
Nenue@74 39 kb.UpdateSpecInfo()
Nenue@74 40 kb.UpdateTalentInfo()
Nenue@70 41 kb.UpdatePetInfo()
Nenue@74 42 kb.SelectProfileSet(kb.profileName)
Nenue@74 43 kb.ApplyAllBindings()
Nenue@75 44 SkeletonKey:Update(true)
Nenue@74 45 end
Nenue@74 46
Nenue@74 47 kb.SPELLS_CHANGED = function()
Nenue@74 48 SkeletonKey:Update()
Nenue@70 49 end
Nenue@70 50
Nenue@70 51 kb.UPDATE_MACROS = function()
Nenue@70 52 kb.UpdateMacroInfo()
Nenue@70 53 end
Nenue@70 54
Nenue@70 55 kb.UPDATE_BINDINGS = function()
Nenue@70 56 kb.UpdateSystemBinds()
Nenue@70 57 end