Referencia › Referencia de funciones › Conditions

Conditions.talent.treeName

dependencia

Llamar como

Conditions.talent.treeName(value, spec)

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

Names the talent tree in a talent tree condition's description: the client's tree name, else "Talent tree N", else "<talent tree>" when no tree is set.

Argumentos

NombreTipoQué hace
valuetableCondition settings with a tree field.
specnumber | nilSpecialization the editor is for; on progression clients a value from 1 to 4 also selects the talent group to read.

Retornos

1stringLocalized tree name or placeholder.

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

  • Árbol de talentos principal (print)
    return string.format(L['your primary talent tree {{!is|is not}} %s'],treeName(value,spec))
  • Puntos del árbol de talentos (print)
    return Functions.presentation.compareString(value.operator,string.format(L['the number of points spent in %s'],treeName(value,spec)),Functions.presentation.nullable(value.value))

Dependencias

Código fuente

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

Conditions.talent.treeName(value, spec)
    local name=integer(value.tree,1,16) and addon.TalentTrees.Name(value.tree,addon.TalentTrees.ContextClass(),group(spec))
    return name or value.tree and string.format(L['Talent tree %s'],tostring(value.tree)) or L['<talent tree>']

Volver a Referencia de funciones