Reference › Function reference › Conditions

Conditions.talent.groupLabel

dependency

Call as

Conditions.talent.groupLabel(candidate)

Record the dependency Conditions.talent.groupLabel, 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

The heading above one group of talents in the Retail and Forever talent list: class talents, specialization talents, both, one hero tree, or a plain name.

Arguments

NameTypeWhat it does
candidatetableA talent group with its kind ("class", "spec", "talents" or "hero") and, for a hero tree, its name.

Returns

1stringThe localized heading.

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

Source

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

Conditions.talent.groupLabel(candidate)
    if candidate.kind=="class" then return L["Class talents"] end
    if candidate.kind=="spec" then return L["Specialization talents"] end
    if candidate.kind=="talents" then return L["Class and specialization talents"] end
    if candidate.kind=="hero" then return candidate.name and string.format(L["Hero talents: %s"],candidate.name) or L["Hero Talents"] end
    return candidate.name or L["Talents"]

Back to Function reference