comparison BindingsFrame.lua @ 71:ca3118127e5e

- Talent change detection - Use stored assignments for inactive talent slots
author Nenue
date Fri, 06 Jan 2017 16:21:49 -0500
parents 131d9190db6b
children c48913c5924c
comparison
equal deleted inserted replaced
70:131d9190db6b 71:ca3118127e5e
508 508
509 if not tContains(self.assignedKeys, binding) then 509 if not tContains(self.assignedKeys, binding) then
510 tinsert(self.assignedKeys, 1, binding) 510 tinsert(self.assignedKeys, 1, binding)
511 end 511 end
512 512
513 local talentInfo 513 local talentInfo = kb.DynamicSpells[spellName]
514 if spellName and kb.TalentCache[spellName] then 514 if spellName and talentInfo then
515 print('store dynamicType talent') 515 print('store dynamicType talent')
516 talentInfo = { 516 if talentInfo.dynamicType == 'talent' then
517 macroName = self.macroName, 517 talentInfo = {
518 actionName = self.actionName, 518 macroName = self.macroName,
519 actionType = self.actionType, 519 actionName = self.actionName,
520 actionID = self.actionID, 520 actionType = self.actionType,
521 assignedKeys = self.assignedKeys 521 actionID = self.actionID,
522 } 522 assignedKeys = self.assignedKeys
523 kb.currentProfile.talents[spellName] = talentInfo 523 }
524 kb.currentProfile.talents[spellName] = talentInfo
525 end
524 end 526 end
525 527
526 for _, key in ipairs(self.assignedKeys) do 528 for _, key in ipairs(self.assignedKeys) do
527 if not kb.currentProfile.bindings[key] then 529 if not kb.currentProfile.bindings[key] then
528 kb.currentProfile.bindings[key] = self.command 530 kb.currentProfile.bindings[key] = self.command