Aufruf als
Conditions.talent.groupLabel(candidate)
Erfassen Sie die Abhängigkeit Conditions.talent.groupLabel 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
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.
Argumente
| Name | Typ | Was sie bewirkt |
|---|---|---|
candidate | table | A talent group with its kind ("class", "spec", "talents" or "hero") and, for a hero tree, its name. |
Rückgabewerte
| 1 | string | The localized heading. |
|---|
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
Conditions.talent.traitsWidgetfor index,candidate in ipairs(groups) do groupNames[index]=groupLabel(candidate);groupOrder[#groupOrder+1]=index end
Quelle
Conditions/talent.lua, Zeile 293. Im Spiel schreibgeschützt; Duplizieren erstellt eine bearbeitbare Kopie.
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"]