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

Conditions.talent.info

dependência

Chame como

Conditions.talent.info(value, spec)

Registre a dependência Conditions.talent.info 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

Looks up the talent a TALENT condition refers to, according to its layout: a trait node and entry, a grid index, or a tree and talent index. Returns nil for any other shape.

Argumentos

NomeTipoO que faz
valuetableSaved TALENT condition settings.
specnumber | nilSpecialization the editor is for; on progression clients a value from 1 to 4 also selects the talent group to read.

Retornos

1table | nilTalent identity from the platform (name, icon and IDs where known), or nil.
2string | nilThe platform's reason for nil, when it gives one.

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

Dependências

Código-fonte

Conditions/talent.lua, linha 109. Somente leitura no jogo; Duplicar cria uma cópia editável.

Conditions.talent.info(value, spec)
    if traitShape(value) then return integer(value.node,1,2147483647) and platform:GetTraitTalentIdentity(value.node,value.entry,value.spell) or nil end
    if value.layout=="grid" then return platform:GetGridTalentInfo(value.value,group(spec)) end
    if treeShape(value) then
        -- The game answers for the player's own class only; another class's
        -- talent index would name one of the player's talents instead.
        if not ownTrees() then return nil end
        return platform:GetTreeTalentInfo(value.tree,value.talent,group(spec))
    end

Voltar para Referência de funções