Riferimento › Riferimento delle funzioni › Platform

Platform.spells.gcdRunning

dipendenza

Chiamala come

Platform.spells.gcdRunning(self, now)

Registra la dipendenza Platform.spells.gcdRunning, poi chiamala con quel nome. Una chiamata con spazio dei nomi non passa self: usa una chiamata con i due punti o passa tu l'oggetto.

Cosa fa

Reports whether the global cooldown is running at time now. It resolves the global cooldown spell through addon.Platform:GetGlobalCooldown() when needed, then uses the readable times (enabled, positive duration, expiry after now) or, when the times are secret, the isEnabled and isActive flags. Returns nil with a reason when neither is available.

Argomenti

NomeTipoCosa fa
selfRMPlatformRotation Master platform adapter (normally addon.Platform), used for its CanReadValue check.
nownumberEvaluation time in GetTime() seconds.

Valori restituiti

1boolean | nilTrue when the global cooldown is running, false when it is not; nil when unavailable.
2string | nilReason when the result is nil.

Edizioni

Le funzioni di supporto integrate sono registrate su ogni edizione. Ciò che cambia è l'API di gioco che leggono; dove ne manca una, la funzione di supporto ripiega su un'alternativa o restituisce nil con un motivo.

Non legge direttamente alcuna API di gioco.

Come la chiama l'addon

Dipendenze

Sorgente

Platform/spells.lua, riga 534. Nel gioco è in sola lettura; Duplica crea una copia modificabile.

Platform.spells.gcdRunning(self, now)
    if not gcdSpell then self:GetGlobalCooldown() end
    local start,duration,enabled,why,active=cooldownValues(self,gcdSpell)
    if start~=nil then return enabled and duration>0 and start+duration>now end
    if active==nil then return nil,why end
    return enabled and active

Torna a Riferimento delle funzioni