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
| Nombre | Tipo | Qué hace |
|---|---|---|
candidate | table | A talent group with its kind ("class", "spec", "talents" or "hero") and, for a hero tree, its name. |
Retornos
| 1 | string | The 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
Conditions.talent.traitsWidgetfor index,candidate in ipairs(groups) do groupNames[index]=groupLabel(candidate);groupOrder[#groupOrder+1]=index end
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"]