API GetSpellCharges

From Wowpedia
Jump to: navigation, search

Returns information about the charges of a charge-accumulating player ability.

currentCharges, maxCharges, cooldownStart, cooldownDuration, chargeModRate = GetSpellCharges(spellId or "spellName")

Arguments

spellId 
Number - spell ID of a player ability to query.

or

spellName 
String - name of a player ability to query.

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 and cooldownDuration return values indicate the cooldown timer for the acquiring next charge (when currentCharges is less than maxCharges).
  • If the queried spell does not accumulate charges over time (e.g. [Arcane Missiles] or [Jab]), this function does not return any values.

Patch changes

  • Legion Patch 7.1.0 (2016-10-25): The chargeModRate return value was added.