Chiamala come
Platform.spells.flagReadiness(self, enabled, active, onGCD, now)
Registra la dipendenza Platform.spells.flagReadiness, 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
Decides cooldown readiness from the never-secret flags when the cooldown times are hidden. Returns false when the cooldown is disabled, true when no cooldown is active, false when the active cooldown is known not to be the global cooldown or the global cooldown is known not to be running, and true when the active cooldown is the global cooldown; otherwise nil with a reason.
Argomenti
| Nome | Tipo | Cosa fa |
|---|---|---|
self | RMPlatform | Rotation Master platform adapter (normally addon.Platform), used for its CanReadValue check. |
enabled | boolean | The spell's isEnabled flag. |
active | boolean | The spell's isActive flag. |
onGCD | boolean | nil | The spell's isOnGCD flag, when the client reports it. |
now | number | Evaluation time in GetTime() seconds, used to test the global cooldown. |
Valori restituiti
| 1 | boolean | nil | True when ready by the end of the global cooldown, false when not; nil when it cannot be decided. |
|---|---|---|
| 2 | string | nil | The global cooldown reason, or restricted-value, 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.
Valori segreti (Retail e Forever)
Su Retail e Forever il gioco fornisce agli addon valori segreti. Questa funzione di supporto controlla ciò che legge (addon.Platform:CanReadValue) e restituisce nil con un motivo come restricted-value invece di un valore segreto che non può confrontare. Considera nil come non disponibile, non come false.
Come la chiama l'addon
Platform.spells.IsSpellReadyreturn flagReadiness(self,enabled,active,onGCD,now)
Dipendenze
gcdRunning→Platform.spells.gcdRunning
Sorgente
Platform/spells.lua, riga 556. Nel gioco è in sola lettura; Duplica crea una copia modificabile.
Platform.spells.flagReadiness(self, enabled, active, onGCD, now)
if not enabled then return false end
if not active then return true end
if onGCD==false then return false end
local running,why=gcdRunning(self,now)
if running==false then return false end
if onGCD==true then return true end
return nil,why or "restricted-value"