Mortilus39230@legacy41559172 (talk | contribs) |
m (→Returns: .apilink) Tag: WoW API docs |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
− | <center>'''IsUsableAction'''</center> |
||
− | Determine if an action can be used. |
+ | Determine if an action can be used (you have sufficient mana, reagents and the action is not on cooldown). |
isUsable, notEnoughMana = IsUsableAction(slot) |
isUsable, notEnoughMana = IsUsableAction(slot) |
||
− | == Parameters == |
||
⚫ | |||
− | :(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) |
||
+ | :;slot : Number - [[Action slot]] to query |
||
⚫ | |||
− | For a rogue, the default Blizzard UI action slot numbering is |
||
− | 1-12 main bar |
||
− | 13-24 unknown. I could not find what these 12 buttons were |
||
− | 25-36 far right (on the right) (added through Interface Options) (top to bottom) |
||
− | 37-48 far right (on the left) (added through Interface Options) (top to bottom) |
||
− | 49-60 bottom right (added through Interface Options) (left to right) |
||
− | 61-72 bottom left (added through Interface Options) (left to right) |
||
− | 73-84 stealth bar (left to right) |
||
⚫ | |||
− | not sure for other classes, but it is probably different. |
||
+ | ;notEnoughMana : <span class="apitype">boolean</span> - true if the action is unusable beacuse the player does not have enough mana, rage, etc.; false otherwise. |
||
− | |||
⚫ | |||
− | :isUsable, notEnoughMana |
||
− | |||
⚫ | |||
− | :;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 == |
||
− | <!-- begin code --> |
||
− | local isUsable, notEnoughMana = IsUsableAction(1); |
||
− | <!-- end code --> |
||
− | ---- |
||
⚫ | |||
− | {{Template:WoW API}} |
Revision as of 03:21, 26 August 2021
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Determine if an action can be used (you have sufficient mana, reagents and the action is not on cooldown).
isUsable, notEnoughMana = IsUsableAction(slot)
Arguments
- slot
- Number - Action slot to query
Returns
- isUsable
- boolean - true if the action is currently usable (does not check cooldown or range), false otherwise.
- notEnoughMana
- boolean - true if the action is unusable beacuse the player does not have enough mana, rage, etc.; false otherwise.