WoW:API IsUsableAction: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page, info grabbed from a post of Sarf's on cosmosui forum)
 
No edit summary
Line 17: Line 17:


  isUsable, mana
  isUsable, mana
isUseable = 1 or 'nil'


----
----

Revision as of 16:29, 25 May 2005

isUsableAction

Checks to see if a given action is usable, and also if you have the required mana/energy/rage to activate it.

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. If you keep it on action button 12 on bar 6, it's 6*12 = 72.


Returns
isUsable, mana

isUseable = 1 or 'nil'


Example
local isUsable, notEnoughMana = IsUsableAction(1); 
Result

Description



Template:WoW API