WoW:API GetActionCount: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Copy-edited to fit {{wowapi}})
Line 1: Line 1:
<center>'''GetActionCount''' - ''Documentation by [[User:Flickering|Flickering]]''</center>
{{wowapi}} __NOTOC__


Get the available count for an action.
Gets the available count for an action, if applicable.
{{Code/Begin}}
text = GetActionCount(actionSlot)
{{Code/End}}
{{clr}}
== Parameters ==
''Arguments''
 
:;actionSlot - [[ActionSlot]] : The queried action slot.


text = GetActionCount(actionSlot)
''Returns''
== Parameters ==
=== Arguments ===
:(actionSlot)


:;actionSlot : Number - The slot number of the action to query.
:;text - Number
=== Returns ===
:* The action's count as displayed on the action's icon; e.g. for a potion action, returns the number of potions left.
:count
:* 0, if the action has no count or if the specified action slot is empty


:;count : Number If the action has a count (such as potion actions), then the count for the action is returned. 0 is returned for slots with no count as well as empty slots.


== See Also ==
== See Also ==
* [[API IsConsumableAction|IsConsumableAction(slot)]] to determine whether '0' means that there are no more charges of the item, or whether it simply doesn't have a count.
* Use [[API IsConsumableAction|IsConsumableAction(slot)]] to determine whether a returned <tt>0</tt> means that there are no more charges of the item, or whether it simply doesn't have a count.
 
----
__NOTOC__
{{Template:WoW API}}

Revision as of 19:28, 16 October 2006

WoW API < GetActionCount

Gets the available count for an action, if applicable. Template:Code/Begin text = GetActionCount(actionSlot) Template:Code/End

Parameters

Arguments

actionSlot - ActionSlot
The queried action slot.

Returns

text - Number
  • The action's count as displayed on the action's icon; e.g. for a potion action, returns the number of potions left.
  • 0, if the action has no count or if the specified action slot is empty


See Also

  • Use IsConsumableAction(slot) to determine whether a returned 0 means that there are no more charges of the item, or whether it simply doesn't have a count.