Reference › Function reference › Conditions

Conditions.bossmod.timerNote

dependency

Call as

Conditions.bossmod.timerNote()

Record the dependency Conditions.bossmod.timerNote, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.

What it does

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.

Arguments

None.

Returns

1stringLocalized one-line status text; never nil.

Editions

Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.

It reads no game API directly.

How the addon calls it

Source

Conditions/bossmod.lua, line 108. Read only in game; Duplicate makes an editable copy.

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, ", ")

Back to Function reference