Chame como
Conditions.talent.groupLabel(candidate)
Registre a dependência Conditions.talent.groupLabel 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
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
| Nome | Tipo | O que faz |
|---|---|---|
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. |
|---|
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
Conditions.talent.traitsWidgetfor index,candidate in ipairs(groups) do groupNames[index]=groupLabel(candidate);groupOrder[#groupOrder+1]=index end
Código-fonte
Conditions/talent.lua, linha 293. Somente leitura no jogo; Duplicar cria uma cópia editável.
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"]