Lore archive · Warcraft Wiki, 2023 dump
API GetSpellCharges
Last wiki revision 2022-08-01
Returns information about the charges of a charge-accumulating player ability. currentCharges, maxCharges, cooldownStart, cooldownDuration, chargeModRate = GetSpellCharges(spell) = GetSpellCharges(index, bookType)
- currentCharges: - The number of charges of the ability currently available.
- maxCharges: - The maximum number of charges the ability may have available.
- cooldownStart: - Time (per ) at which the last charge cooldown began, or - cooldownDuration if the spell is not currently recharging.
- cooldownDuration: - Time (in seconds) required to gain a charge.
- chargeModRate: - The rate at which the charge cooldown widget's animation should be updated.
- Abilities like Roll (monk ability) can be used by the player rapidly, and then slowly accumulate charges over time. The and return values indicate the cooldown timer for the acquiring next charge (when is less than ).
- 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.
- - Referring to a button on an action bar.
Source
https://warcraft.wiki.gg/wiki/API_GetSpellCharges · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.