Chiamala come
Conditions.talent.groupLabel(candidate)
Registra la dipendenza Conditions.talent.groupLabel, poi chiamala con quel nome. Una chiamata con spazio dei nomi non passa self: usa una chiamata con i due punti o passa tu l'oggetto.
Cosa fa
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.
Argomenti
| Nome | Tipo | Cosa fa |
|---|---|---|
candidate | table | A talent group with its kind ("class", "spec", "talents" or "hero") and, for a hero tree, its name. |
Valori restituiti
| 1 | string | The localized heading. |
|---|
Edizioni
Le funzioni di supporto integrate sono registrate su ogni edizione. Ciò che cambia è l'API di gioco che leggono; dove ne manca una, la funzione di supporto ripiega su un'alternativa o restituisce nil con un motivo.
Non legge direttamente alcuna API di gioco.
Come la chiama l'addon
Conditions.talent.traitsWidgetfor index,candidate in ipairs(groups) do groupNames[index]=groupLabel(candidate);groupOrder[#groupOrder+1]=index end
Sorgente
Conditions/talent.lua, riga 293. Nel gioco è in sola lettura; Duplica crea una copia modificabile.
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"]