Tag: WoW API docs |
No edit summary Tag: WoW API docs |
||
Line 25: | Line 25: | ||
* {{api|GetActionCharges(slot)}} - Referring to a button on an action bar. |
* {{api|GetActionCharges(slot)}} - Referring to a button on an action bar. |
||
<!-- emmylua |
<!-- emmylua |
||
− | ---@param spell number|string |
+ | ---@param spell number|string |
---@return number currentCharges |
---@return number currentCharges |
||
---@return number maxCharges |
---@return number maxCharges |
||
Line 31: | Line 31: | ||
---@return number cooldownDuration |
---@return number cooldownDuration |
||
---@return number chargeModRate |
---@return number chargeModRate |
||
⚫ | |||
function GetSpellCharges(spell) end |
function GetSpellCharges(spell) end |
||
− | |||
− | ---@param index number |
||
⚫ | |||
− | ---@return number currentCharges |
||
− | ---@return number maxCharges |
||
− | ---@return number cooldownStart |
||
− | ---@return number cooldownDuration |
||
− | ---@return number chargeModRate |
||
− | function GetSpellCharges(index, bookType) end |
||
--> |
--> |
Revision as of 05:35, 20 May 2022
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns information about the charges of a charge-accumulating player ability.
currentCharges, maxCharges, cooldownStart, cooldownDuration, chargeModRate = GetSpellCharges(spell) = GetSpellCharges(index, bookType)
Arguments
SpellInfo
Returns
- currentCharges
- number - The number of charges of the ability currently available.
- maxCharges
- number - The maximum number of charges the ability may have available.
- cooldownStart
- number - Time (per GetTime) at which the last charge cooldown began, or
2^32 / 1000
- cooldownDuration if the spell is not currently recharging. - cooldownDuration
- number - Time (in seconds) required to gain a charge.
- chargeModRate
- number - The rate at which the charge cooldown widget's animation should be updated.
Details
- Abilities like [Roll] can be used by the player rapidly, and then slowly accumulate charges over time. The
cooldownStart
andcooldownDuration
return values indicate the cooldown timer for the acquiring next charge (whencurrentCharges
is less thanmaxCharges
). - If the queried spell does not accumulate charges over time (e.g. [Arcane Missiles] or [Jab]), this function does not return any values.
- Targeted dispels like [Purify] or [Cleanse Spirit] hold one hidden charge which may be queried with GetSpellCharges. The spells will immediately—or after a few in-game ticks—regain their charge if cast on a friendly unit that could not be dispelled. This may cause sporadic behavior when tracking cooldowns, because upon raising SPELL_UPDATE_COOLDOWN, the function API GetSpellCooldown will momentarily return that the spell is on it's full cooldown duration.
Patch changes
- Patch 7.1.0 (2016-10-25): The
chargeModRate
return value was added.
See also
- GetActionCharges(slot) - Referring to a button on an action bar.