Mercurial > wow > skeletonkey
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 73:68365bda5ab5 | 74:9824d524a661 |
|---|---|
| 19 kb.UNIT_PORTRAIT_UPDATE = function() | 19 kb.UNIT_PORTRAIT_UPDATE = function() |
| 20 SkeletonKey:Update() | 20 SkeletonKey:Update() |
| 21 end | 21 end |
| 22 | 22 |
| 23 kb.PLAYER_REGEN_ENABLED = function() | 23 kb.PLAYER_REGEN_ENABLED = function() |
| 24 SkeletonKey:Update() | 24 SkeletonKey:SetShown(kb.db.showUI) |
| 25 end | |
| 26 | |
| 27 kb.PLAYER_SPECIALIZATION_CHANGED = function(...) | |
| 28 | |
| 29 kb.UpdateSpecInfo() | |
| 30 kb.UpdateTalentInfo() | |
| 31 | |
| 32 kb.SelectProfileSet(kb.profileName) | |
| 33 kb.ApplyAllBindings() | |
| 34 SkeletonKey:Update(true) | |
| 35 end | |
| 36 kb.PLAYER_TALENT_UPDATE = function() | |
| 37 --kb.UpdateTalentInfo() | |
| 38 --kb.SelectProfileSet(kb.profileName) | |
| 39 --kb.ApplyAllBindings() | |
| 40 --SkeletonKey:Update() | |
| 41 end | 25 end |
| 42 kb.ACTIONBAR_SLOT_CHANGED = function(self, event, slot) | 26 kb.ACTIONBAR_SLOT_CHANGED = function(self, event, slot) |
| 43 --kb.HotKeyText(slot) | 27 --kb.HotKeyText(slot) |
| 44 return true | 28 return true |
| 45 end | 29 end |
| 46 | 30 |
| 31 kb.PLAYER_TALENT_UPDATE = function() | |
| 32 kb.TalentsChanged = true | |
| 33 end | |
| 34 | |
| 47 -- only need to respond to this for pet actions | 35 -- only need to respond to this for pet actions |
| 48 kb.SPELLS_CHANGED = function(self, event, unit) | 36 kb.PLAYER_SPECIALIZATION_CHANGED = function(self, event, unit) |
| 49 print('|cFFFF0088'.. event..'|r', unit) | 37 kb.UpdateSpecInfo() |
| 38 kb.UpdateTalentInfo() | |
| 50 kb.UpdatePetInfo() | 39 kb.UpdatePetInfo() |
| 40 kb.SelectProfileSet(kb.profileName) | |
| 41 kb.ApplyAllBindings() | |
| 42 end | |
| 43 | |
| 44 kb.SPELLS_CHANGED = function() | |
| 45 SkeletonKey:Update() | |
| 51 end | 46 end |
| 52 | 47 |
| 53 kb.UPDATE_MACROS = function() | 48 kb.UPDATE_MACROS = function() |
| 54 kb.UpdateMacroInfo() | 49 kb.UpdateMacroInfo() |
| 55 end | 50 end |
