Referenz › Funktionsreferenz › Conditions

Conditions.talent.info

Abhängigkeit

Aufruf als

Conditions.talent.info(value, spec)

Erfassen Sie die Abhängigkeit Conditions.talent.info und rufen Sie sie dann unter diesem Namen auf. Ein Aufruf über den Namensraum übergibt kein self: Verwenden Sie einen Doppelpunkt-Aufruf oder übergeben Sie das Objekt selbst.

Was sie bewirkt

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.

Argumente

NameTypWas sie bewirkt
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.

Rückgabewerte

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.

Editionen

Integrierte Hilfsfunktionen werden auf jeder Edition registriert. Unterschiedlich ist die Spiel-API, die sie lesen; fehlt eine, weicht die Hilfsfunktion aus oder gibt nil mit einem Grund zurück.

Sie liest keine Spiel-API direkt.

Wie das Addon sie aufruft

Abhängigkeiten

Quelle

Conditions/talent.lua, Zeile 109. Im Spiel schreibgeschützt; Duplizieren erstellt eine bearbeitbare Kopie.

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

Zurück zu Funktionsreferenz