Mercurial > wow > skeletonkey
comparison SkeletonKey/ActionTypes.lua @ 22:f6dd297cb812
- fix pet stance/actioni bindings
- fix pet action availability check
author | Nenue |
---|---|
date | Sat, 30 Jul 2016 20:44:03 -0400 |
parents | 564015ef0317 |
children | 4804892802fe |
comparison
equal
deleted
inserted
replaced
21:564015ef0317 | 22:f6dd297cb812 |
---|---|
18 local CLICK_KEYBINDER_MACRO = "CLICK KeyBinderMacro:" | 18 local CLICK_KEYBINDER_MACRO = "CLICK KeyBinderMacro:" |
19 local CLICK_KEYBINDER_KEY = "CLICK KeyBinderKey:" | 19 local CLICK_KEYBINDER_KEY = "CLICK KeyBinderKey:" |
20 local PET_BASIC_SUBTEXT = 'Basic Attack' | 20 local PET_BASIC_SUBTEXT = 'Basic Attack' |
21 local PET_SPECIAL_SUBTEXT = 'Special Ability' | 21 local PET_SPECIAL_SUBTEXT = 'Special Ability' |
22 local PETACTION_SCRIPT = { | 22 local PETACTION_SCRIPT = { |
23 [PET_ACTION_MOVE_TO] = {SLASH_PET_MOVE_TO1, 'pet_move_to'}, | 23 [PET_ACTION_MOVE_TO] = {'pet_move_to', SLASH_PET_MOVE_TO1}, |
24 [PET_ACTION_ATTACK] = {SLASH_PET_ATTACK1, 'pet_attack'}, | 24 [PET_ACTION_ATTACK] = {'pet_attack', SLASH_PET_ATTACK1}, |
25 [PET_ACTION_FOLLOW] = {SLASH_PET_FOLLOW1, 'pet_follow'}, | 25 [PET_ACTION_FOLLOW] = {'pet_follow', SLASH_PET_FOLLOW1}, |
26 [PET_ACTION_WAIT] = {SLASH_PET_STAY1, 'pet_stay'}, | 26 [PET_ACTION_WAIT] = {'pet_stay', SLASH_PET_STAY1 }, |
27 [PET_MODE_AGGRESSIVE] = {SLASH_PET_AGGRESSIVE1, 'pet_aggressive'}, | 27 [PET_MODE_AGGRESSIVE] = {'pet_aggressive', SLASH_PET_AGGRESSIVE1 }, |
28 [PET_MODE_DEFENSIVE] = {SLASH_PET_DEFENSIVE1, 'pet_defensive'}, | 28 [PET_MODE_DEFENSIVE] = { 'pet_defensive', SLASH_PET_DEFENSIVE1}, |
29 [PET_MODE_PASSIVE] = {SLASH_PET_PASSIVE1, 'pet_passive'}, | 29 [PET_MODE_PASSIVE] = { 'pet_passive', SLASH_PET_PASSIVE1}, |
30 [PET_MODE_ASSIST] = {SLASH_PET_ASSIST1, 'pet_assist'}, | 30 [PET_MODE_ASSIST] = {'pet_assist', SLASH_PET_ASSIST1}, |
31 } | 31 } |
32 local SECONDARY_PROFESSIONS = { | 32 local SECONDARY_PROFESSIONS = { |
33 [5] = 3, | 33 [5] = 3, |
34 [7] = 4, | 34 [7] = 4, |
35 [9] = 5, | 35 [9] = 5, |
77 | 77 |
78 atype['petaction'] = function(_, name) | 78 atype['petaction'] = function(_, name) |
79 -- ID doesn't exist for basic commands, even though they can be picked up | 79 -- ID doesn't exist for basic commands, even though they can be picked up |
80 local attributeName, attributeValue = "petaction_" .. tostring(name), "/cast "..tostring(name) | 80 local attributeName, attributeValue = "petaction_" .. tostring(name), "/cast "..tostring(name) |
81 if PETACTION_SCRIPT[name] then | 81 if PETACTION_SCRIPT[name] then |
82 attributeValue, attributeName = unpack(PETACTION_SCRIPT[name]) | 82 attributeName, attributeValue = unpack(PETACTION_SCRIPT[name]) |
83 elseif kb.PetCache.special[name] then | 83 elseif kb.PetCache.special[name] then |
84 attributeName = "petaction_"..kb.PetCache.special[name][3].."_" .. tonumber(kb.PetCache.special[name][6]) | 84 attributeName = "petaction_"..kb.PetCache.special[name][3].."_" .. tonumber(kb.PetCache.special[name][6]) |
85 end | 85 end |
86 return CLICK_KEYBINDER_MACRO, attributeName, attributeValue | 86 return CLICK_KEYBINDER_MACRO, attributeName, attributeValue |
87 end | 87 end |