Chame como
Conditions.talent.treeName(value, spec)
Registre a dependência Conditions.talent.treeName e depois chame-a por esse nome. Uma chamada com namespace não passa self: use uma chamada com dois-pontos ou passe o objeto você mesmo.
O que faz
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
| Nome | Tipo | O que faz |
|---|---|---|
value | table | Condition settings with a tree field. |
spec | number | nil | Specialization the editor is for; on progression clients a value from 1 to 4 also selects the talent group to read. |
Retornos
| 1 | string | Localized tree name or placeholder. |
|---|
Edições
As funções auxiliares integradas são registradas em todas as edições. O que muda é a API do jogo que elas leem; quando uma está ausente, a função auxiliar recorre a uma alternativa ou retorna nil com um motivo.
Não lê nenhuma API do jogo diretamente.
Como o addon a chama
- Árvore de talentos principal (print)
return string.format(L['your primary talent tree {{!is|is not}} %s'],treeName(value,spec)) - Pontos na árvore 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))
Dependências
group→Conditions.talent.groupinteger→Conditions.talent.integer
Código-fonte
Conditions/talent.lua, linha 624. Somente leitura no jogo; Duplicar cria uma cópia editável.
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>']