Справочник › Справочник функций › Conditions

Conditions.talent.info

зависимость

Как вызывать

Conditions.talent.info(value, spec)

Запишите зависимость Conditions.talent.info и вызывайте её по этому имени. Вызов через пространство имён не передаёт self: используйте вызов через двоеточие или передайте объект сами.

Что делает

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.

Аргументы

ИмяТипЧто делает
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.

Возвращает

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.

Издания

Встроенные помощники регистрируются во всех изданиях. Различается игровой API, который они читают; если нужного API нет, помощник использует запасной вариант или возвращает nil с причиной.

Не читает игровой API напрямую.

Как его вызывает аддон

Зависимости

Исходный код

Conditions/talent.lua, строка 109. В игре только для чтения; «Дублировать» создаёт редактируемую копию.

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

Назад: Справочник функций