Referência › Referência de funções › Conditions

Conditions.talent.groupLabel

dependência

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

NomeTipoO que faz
candidatetableA talent group with its kind ("class", "spec", "talents" or "hero") and, for a hero tree, its name.

Retornos

1stringThe 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

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"]

Voltar para Referência de funções