WoW:API GetActionCount: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Copy-edited to fit {{wowapi}})
m (Move page script moved page API GetActionCount to API GetActionCount without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:


Gets the available count for an action, if applicable.
Gets the available count for an action, if applicable.
{{Code/Begin}}
text = GetActionCount(actionSlot)
text = GetActionCount(actionSlot)
 
{{Code/End}}
{{clr}}
== Parameters ==
== Parameters ==
''Arguments''
<big>'''Arguments'''</big>


:;actionSlot - [[ActionSlot]] : The queried action slot.
:;actionSlot - [[ActionSlot]] : The queried action slot.


''Returns''
<big>'''Returns'''</big>


:;text - Number
:;text - Number

Latest revision as of 04:45, 15 August 2023

WoW API < GetActionCount

Gets the available count for an action, if applicable.

text = GetActionCount(actionSlot)

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.