Chame como
Conditions.engraving.runeLabel(value)
Registre a dependência Conditions.engraving.runeLabel e depois chame-a por esse nome. Uma chamada com namespace não passa self: use uma chamada com dois-pontos ou passe o objeto você mesmo.
O que faz
Names the rune selected in a RUNE_ENGRAVED condition: the known rune's name when the platform finds it, else the rune spell's name, else "rune spell N" or "rune N". Returns nil when neither value.rune nor value.spell is set.
Argumentos
| Nome | Tipo | O que faz |
|---|---|---|
value | table | Condition settings with a rune and/or spell field. |
Retornos
| 1 | string | nil | Display name for the rune, or nil when nothing is selected. |
|---|
Edições
As funções auxiliares integradas são registradas em todas as edições. O que muda é a API do jogo que elas leem; quando uma está ausente, a função auxiliar recorre a uma alternativa ou retorna nil com um motivo.
Não lê nenhuma API do jogo diretamente.
Como o addon a chama
- Runa gravada (print)
Functions.presentation.nullable(runeLabel(value), L["<rune>"]))
Dependências
platform(builtin:Conditions/engraving.lua:platform)
Código-fonte
Conditions/engraving.lua, linha 53. Somente leitura no jogo; Duplicar cria uma cópia editável.
Conditions.engraving.runeLabel(value)
local known = platform.FindKnownRune and platform:FindKnownRune(value.rune, value.spell)
if known and known.name then return known.name end
if value.spell ~= nil then
local info = platform.GetSpellInfo and platform:GetSpellInfo(value.spell)
if info and info.name then return info.name end
return string.format(L["rune spell %s"], tostring(value.spell))
end
if value.rune ~= nil then return string.format(L["rune %s"], tostring(value.rune)) end