Aufruf als
Conditions.bossmod.timerNote()
Erfassen Sie die Abhängigkeit Conditions.bossmod.timerNote 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
Builds the status line the boss-mod condition editors show about running boss-mod timers. Lists up to six timers as spell name, spell ID and seconds remaining, or says that no timers are running or why boss-mod data is unavailable.
Argumente
Keine.
Rückgabewerte
| 1 | string | Localized one-line status text; never 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.
Wie das Addon sie aufruft
- Boss-Mod-Timer (widget)
note(parent, timerNote())
Quelle
Conditions/bossmod.lua, Zeile 108. Im Spiel schreibgeschützt; Duplizieren erstellt eine bearbeitbare Kopie.
Conditions.bossmod.timerNote()
if type(addon.ListBossModTimers) ~= "function" then return string.format(L["Boss mod data unavailable: %s"], "adapter-unavailable") end
local rows = addon:ListBossModTimers(6)
if #rows == 0 then
-- The timer list alone does not prove the encounter reader exists.
if type(addon.GetBossModEncounter) ~= "function" then return string.format(L["Boss mod data unavailable: %s"], "adapter-unavailable") end
local active, _, _, detail = addon:GetBossModEncounter()
if active == nil then return string.format(L["Boss mod data unavailable: %s"], tostring(detail or "unknown")) end
return L["No boss-mod timers are running."]
end
local parts = {}
for _, row in ipairs(rows) do
parts[#parts + 1] = string.format("%s (%d) %.0fs", addon:SpellLabel(row.spellId), row.spellId, row.remaining)
end
return L["Running timers:"] .. " " .. table.concat(parts, ", ")