Referencia › Referencia de funciones › Conditions

Conditions.talent.groupLabel

dependencia

Llamar como

Conditions.talent.groupLabel(candidate)

Registra la dependencia Conditions.talent.groupLabel 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

The heading above one group of talents in the Retail and Forever talent list: class talents, specialization talents, both, one hero tree, or a plain name.

Argumentos

NombreTipoQué hace
candidatetableA talent group with its kind ("class", "spec", "talents" or "hero") and, for a hero tree, its name.

Retornos

1stringThe localized heading.

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

Código fuente

Conditions/talent.lua, línea 293. Solo lectura en el juego; Duplicar crea una copia editable.

Conditions.talent.groupLabel(candidate)
    if candidate.kind=="class" then return L["Class talents"] end
    if candidate.kind=="spec" then return L["Specialization talents"] end
    if candidate.kind=="talents" then return L["Class and specialization talents"] end
    if candidate.kind=="hero" then return candidate.name and string.format(L["Hero talents: %s"],candidate.name) or L["Hero Talents"] end
    return candidate.name or L["Talents"]

Volver a Referencia de funciones