Aufruf als
Platform.spells.flagReadiness(self, enabled, active, onGCD, now)
Erfassen Sie die Abhängigkeit Platform.spells.flagReadiness und rufen Sie sie dann unter diesem Namen auf. Ein Aufruf über den Namensraum übergibt kein self: Verwenden Sie einen Doppelpunkt-Aufruf oder übergeben Sie das Objekt selbst.
Was sie bewirkt
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.
Argumente
| Name | Typ | Was sie bewirkt |
|---|---|---|
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. |
Rückgabewerte
| 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. |
Editionen
Integrierte Hilfsfunktionen werden auf jeder Edition registriert. Unterschiedlich ist die Spiel-API, die sie lesen; fehlt eine, weicht die Hilfsfunktion aus oder gibt nil mit einem Grund zurück.
Sie liest keine Spiel-API direkt.
Geheime Werte (Retail und Forever)
Auf Retail und Forever übergibt das Spiel Addons geheime Werte. Diese Hilfsfunktion prüft, was sie liest (addon.Platform:CanReadValue), und gibt statt eines geheimen Werts, den sie nicht vergleichen kann, nil mit einem Grund wie restricted-value zurück. Behandeln Sie nil als nicht verfügbar, nicht als false.
Wie das Addon sie aufruft
Platform.spells.IsSpellReadyreturn flagReadiness(self,enabled,active,onGCD,now)
Abhängigkeiten
gcdRunning→Platform.spells.gcdRunning
Quelle
Platform/spells.lua, Zeile 556. Im Spiel schreibgeschützt; Duplizieren erstellt eine bearbeitbare Kopie.
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"