Mercurial > wow > skeletonkey
comparison SkeletonKey/UI.lua @ 13:eeec4a600064
- kb.bindings carries the exact values needed for matching GetActionInfo() outputs
| author | Nenue |
|---|---|
| date | Thu, 28 Jul 2016 18:20:32 -0400 |
| parents | 8f8917d111c9 |
| children |
comparison
equal
deleted
inserted
replaced
| 12:8f8917d111c9 | 13:eeec4a600064 |
|---|---|
| 321 print(' Special slot: |cFFBBFF00talent|r', name, isAvailable) | 321 print(' Special slot: |cFFBBFF00talent|r', name, isAvailable) |
| 322 end | 322 end |
| 323 | 323 |
| 324 isAvailable = GetSpellInfo(name) | 324 isAvailable = GetSpellInfo(name) |
| 325 end | 325 end |
| 326 actionID = name | |
| 327 elseif actionType == 'macro' then | 326 elseif actionType == 'macro' then |
| 328 if not actionID then | 327 if not actionID then |
| 329 actionID = GetMacroIndexByName(name) | 328 actionID = GetMacroIndexByName(name) |
| 330 end | 329 end |
| 331 isAvailable = true | 330 isAvailable = true |
| 338 isAvailable = true | 337 isAvailable = true |
| 339 end | 338 end |
| 340 | 339 |
| 341 if isAvailable then | 340 if isAvailable then |
| 342 local oldCommand = command | 341 local oldCommand = command |
| 343 macroName, macroText, command = kb.RegisterAction(actionType, actionID) | 342 macroName, macroText, command = kb.RegisterAction(actionType, actionID, name) |
| 344 if oldCommand ~= command then | 343 if oldCommand ~= command then |
| 345 print('|cFFFF4400fixing command string', actionType, actionID, name) | 344 print('|cFFFF4400fixing command string', actionType, actionID, name) |
| 346 kb.currentProfile.bound[oldCommand] = nil | 345 kb.currentProfile.bound[oldCommand] = nil |
| 347 kb.currentProfile.bound[command] = slot | 346 kb.currentProfile.bound[command] = slot |
| 348 for k,v in pairs(kb.currentProfile.bindings) do | 347 for k,v in pairs(kb.currentProfile.bindings) do |
