Reference › Function reference › Conditions

Conditions.talent.treeName

dependency

Call as

Conditions.talent.treeName(value, spec)

Record the dependency Conditions.talent.treeName, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.

What it does

Names the talent tree in a talent tree condition's description: the client's tree name, else "Talent tree N", else "<talent tree>" when no tree is set.

Arguments

NameTypeWhat it does
valuetableCondition settings with a tree field.
specnumber | nilSpecialization the editor is for; on progression clients a value from 1 to 4 also selects the talent group to read.

Returns

1stringLocalized tree name or placeholder.

Editions

Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.

It reads no game API directly.

How the addon calls it

  • Primary Talent Tree (print)
    return string.format(L['your primary talent tree {{!is|is not}} %s'],treeName(value,spec))
  • Talent Tree Points (print)
    return Functions.presentation.compareString(value.operator,string.format(L['the number of points spent in %s'],treeName(value,spec)),Functions.presentation.nullable(value.value))

Dependencies

Source

Conditions/talent.lua, line 624. Read only in game; Duplicate makes an editable copy.

Conditions.talent.treeName(value, spec)
    local name=integer(value.tree,1,16) and addon.TalentTrees.Name(value.tree,addon.TalentTrees.ContextClass(),group(spec))
    return name or value.tree and string.format(L['Talent tree %s'],tostring(value.tree)) or L['<talent tree>']

Back to Function reference