WoW:API IsUsableAction
isUsableAction
Checks to see if a given action is usable, and also if you have the required mana/energy/rage to activate it. Does not consider cooldown.
isUsable, notEnoughMana = IsUsableAction(id);
- Arguments
id
The "id" is the actionbutton id.
If you keep your action you want to check for usability on, say, action button 1 on action bar 1, the id is 1. Action bar 1 starts at id 1, action bar 2 starts at id 12, action bar 3 at id 24 and so on. If you keep it on action button 5 on bar 3, it's (3-1)*12 + 5 = 27.
- Returns
isUsable, notEnoughMana
isUseable = 1 if the action button is useable, or 'nil' if it is not.
notEnoughMana = 1 if low mana is the cause, or 'nil' if mana is not the cause, or if the button is usable.
- Example
local isUsable, notEnoughMana = IsUsableAction(1);
- Result
- Description