GetActionUsable( slotno )
Find out if an action icon placed on an action bar can be used or not. This refers to the type of the item in the associated slotno, not if you can currently use it (the cooldown). For example if you use it to check a slotno with a consumable in it, it will always return true regardless of whether it is on cooldown.
Parameters[ | ]
Arguments[ | ]
- slotno
- number - the slot number of an action bar.
Returns[ | ]
- flag
- Boolean value.
true
if action is usable,false
otherwise.
Example[ | ]
-- Print if an action is usable or not to the Say channel.
local function PrintUsable( slotno )
if( GetActionUsable( slotno ) then
SendChatMessage("My action is usable.","SAY");
else
SendChatMessage("My action is not usable.","SAY");
end
end
Notes[ | ]
Reference to slot numbers.