Llamar como
Conditions.bossmod.encounterNote()
Registra la dependencia Conditions.bossmod.encounterNote y luego llámala con ese nombre. Una llamada con espacio de nombres no pasa self: usa una llamada con dos puntos o pasa tú mismo el objeto.
Qué hace
Builds the status line the boss-mod condition editors show about the current encounter. Reads addon:GetBossModEncounter and reports the encounter name, ID and stage, that no encounter is in progress, or why boss-mod data is unavailable (adapter-unavailable when the adapter API is missing).
Argumentos
Ninguno.
Retornos
| 1 | string | Localized one-line status text; never nil. |
|---|
Ediciones
Las funciones auxiliares integradas se registran en todas las ediciones. Lo que cambia es la API del juego que leen; donde falta alguna, la función auxiliar recurre a una alternativa o devuelve nil con un motivo.
No lee directamente ninguna API del juego.
Cómo la llama el addon
- Encuentro del mod de jefes (widget)
note(parent, encounterNote()) - Fase del encuentro del mod de jefes (widget)
note(parent, encounterNote())
Código fuente
Conditions/bossmod.lua, línea 97. Solo lectura en el juego; Duplicar crea una copia editable.
Conditions.bossmod.encounterNote()
if type(addon.GetBossModEncounter) ~= "function" then return string.format(L["Boss mod data unavailable: %s"], "adapter-unavailable") end
local active, id, stage, detail = addon:GetBossModEncounter()
if active == nil then return string.format(L["Boss mod data unavailable: %s"], tostring(detail or "unknown")) end
if not active then return L["No boss-mod encounter is in progress."] end
return string.format(L["Current encounter: %s (ID %s), stage %s"], detail or L["Unknown"], id and tostring(id) or L["none"], tostring(stage))