Mercurial > wow > skeletonkey
diff ActionTemplates.lua @ 80:b9a53385462c
- Fixed Demon Hunter Vengeance bindings, along with other spells that are replaced by specialization variants.
- Spells replaced by a specialization now display the replacing name along with the original name in their binding slot.
author | Nick@Zahhak |
---|---|
date | Tue, 21 Mar 2017 02:23:23 -0400 |
parents | d4c100b0fd01 |
children | 9a206b105ea5 |
line wrap: on
line diff
--- a/ActionTemplates.lua Thu Jan 26 20:27:06 2017 -0500 +++ b/ActionTemplates.lua Tue Mar 21 02:23:23 2017 -0400 @@ -125,25 +125,27 @@ return spells[spellID] end --- tries to resolve spells from talent overrides/profession book/etc +-- verifies binding slot data local dynamicTypes = {['profession'] = 'ProfessionCache', ['talent'] = 'TalentCache', ['petaction'] = 'PetInfoCache'} kb.ResolveSpellSlot = function(self) local spellName, spellID, command, icon = self.actionName, self.actionID, self.command, self.iconPath - --print(' In:', spellName, spellID, command) + --print(GetSpellInfo(spellName or spellID)) - local internalName, _, internalIcon, _, _, _, _ = GetSpellInfo(spellName or spellID) + local internalName, _, internalIcon, _, _, _, _ = GetSpellInfo(spellID) + local replacerName, _, _, _, _, _, replacerID = GetSpellInfo(internalName) + print('Resolve Slot: id =', spellID, 'nameFromID =', internalName, 'nameFromName =', replacerName) local isAvailable = internalName and true - if internalName and (internalName ~= spellName) then - -- it's a binding for the originating spell, leave it as is - print(' |cFFFF4400spell is an override(', internalName, '~=', spellName,') leave the name info alone') + -- keep current slotInfo if it's a spell that has been replaced by spec/talent + if internalName and (internalName ~= replacerName) then + print(' |cFFFF4400spell name is overridden by', replacerName, '(was', internalName,')') self.statusText = '|cFFFFFF00Spell|r' self.isAvailable = true return end - -- let's us match spells replaced by talents - local info = kb.DynamicSpells[internalName or spellName] + -- resolve spell name + local info = kb.DynamicSpells[spellName] if not info then local dynamicType, dynamicIndex, dynamicSubIndex = command:match("(%a+)_(%S+)_(%S+)") if kb.DynamicSpells[dynamicType] then @@ -198,8 +200,16 @@ local isAvailable local specialButtonType if actionType == 'spell' then - cprint(GetSpellInfo(actionID)) - local dynamicInfo = kb.DynamicSpells[name] + local realName, _, _, _, _, _, realID = GetSpellInfo(name) + if realName and (realName ~= name) then + print(' *** "', name, '" resolves to something else...', realName, realID) + --name, actionID = realName, realID + indexKey = actionType .. '_'.. realID + end + + + + local dynamicInfo = kb.DynamicSpells[spellName] if dynamicInfo then configTable.assignedKeys = configTable.assignedKeys or {GetBindingKey(configTable.command) }