Référence › Référence des fonctions › Conditions

Conditions.talent.info

dépendance

Appel

Conditions.talent.info(value, spec)

Enregistrez la dépendance Conditions.talent.info, puis appelez-la sous ce nom. Un appel par espace de noms ne transmet pas self : utilisez un appel avec deux-points ou passez l'objet vous-même.

Ce qu'elle fait

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.

Arguments

NomTypeCe qu'elle fait
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.

Retours

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.

Éditions

Les fonctions utilitaires intégrées sont enregistrées sur toutes les éditions. Ce qui diffère, c'est l'API du jeu qu'elles lisent ; quand l'une manque, la fonction utilitaire se rabat sur une alternative ou renvoie nil avec une raison.

Elle ne lit directement aucune API du jeu.

Comment l'addon l'appelle

Dépendances

Source

Conditions/talent.lua, ligne 109. En lecture seule dans le jeu ; Dupliquer crée une copie modifiable.

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

Retour à Référence des fonctions