WoW:API IsUsableAction: Difference between revisions
Jump to navigation
Jump to search
IsUsableAction
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
:;slot : Integer - The action slot to retrieve data for. | :;slot : Integer - The action slot to retrieve data for. | ||
For a warrior, the action slot numbering is | |||
25-36 bar on right-side of screen, far right (top to bottom) | |||
37-48 bar on right-side of screen, in one column (top to bottom) | |||
49-60 lower right bar (left to right) | |||
61-72 lower left bar (left to right) | |||
73-84 battle stance bar (left to right) | |||
85-96 defensive stance bar (left to right) | |||
97-108 berserker stance bar (left to right) | |||
not sure for other classes, but it is probably different. | |||
=== Returns === | === Returns === | ||
:isUsable, notEnoughMana | :isUsable, notEnoughMana |
Revision as of 09:22, 18 April 2006
Determine if an action can be used.
isUsable, notEnoughMana = IsUsableAction(slot)
Parameters
Arguments
- (slot)
- slot
- Integer - The action slot to retrieve data for.
For a warrior, the action slot numbering is
25-36 bar on right-side of screen, far right (top to bottom) 37-48 bar on right-side of screen, in one column (top to bottom) 49-60 lower right bar (left to right) 61-72 lower left bar (left to right) 73-84 battle stance bar (left to right) 85-96 defensive stance bar (left to right) 97-108 berserker stance bar (left to right)
not sure for other classes, but it is probably different.
Returns
- isUsable, notEnoughMana
- isUsable
- Flag - Returns 1 if the action is valid for use at present (Does NOT include cooldown or range tests), nil otherwise.
- notEnoughMana
- Flag - Returns 1 if the reason for the action not being usable is because there is not enough mana/rage/energy, nil otherwise.
Example
local isUsable, notEnoughMana = IsUsableAction(1);