diff Events.lua @ 74:9824d524a661

- binding slot mixin: - store key binding definitions under their slot's data table - apply action button attributes when a slot is assigned - obtain correct macro body text when a macro is slotted - fix algorithm for resolving renamed macro indices - move spell detail lookup code out of mixin script - event chains: - initialize addon from PLAYER_LOGIN - reload keybinds from PLAYER_SPECIALIZATION_CHANGED, after spec profile is resolved - refresh interface content from SPELLS_CHANGED - hotkey text: - restore communication and detection of key binding updates and reflect them accordingly - properly respond to dynamic bindings that result from talent updates
author Nenue
date Sat, 14 Jan 2017 02:29:33 -0500
parents c48913c5924c
children e75a2fd448c0
line wrap: on
line diff
--- a/Events.lua	Sat Jan 07 12:52:05 2017 -0500
+++ b/Events.lua	Sat Jan 14 02:29:33 2017 -0500
@@ -21,33 +21,28 @@
 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()
+  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
+
 -- only need to respond to this for pet actions
-kb.SPELLS_CHANGED = function(self, event, unit)
-  print('|cFFFF0088'.. event..'|r', unit)
+kb.PLAYER_SPECIALIZATION_CHANGED = function(self, event, unit)
+  kb.UpdateSpecInfo()
+  kb.UpdateTalentInfo()
   kb.UpdatePetInfo()
+  kb.SelectProfileSet(kb.profileName)
+  kb.ApplyAllBindings()
+end
+
+kb.SPELLS_CHANGED = function()
+  SkeletonKey:Update()
 end
 
 kb.UPDATE_MACROS = function()