Llamar como
Conditions.talent.treeExists(value, cache)
Registra la dependencia Conditions.talent.treeExists y luego llámala con ese nombre. Una llamada con espacio de nombres no pasa self: usa una llamada con dos puntos o pasa tú mismo el objeto.
Qué hace
Checks that a talent condition's tree index exists on this client, using the cached platform talent tree count.
Argumentos
| Nombre | Tipo | Qué hace |
|---|---|---|
value | table | Condition settings with a numeric tree field. |
cache | table | nil | Evaluation-pass cache passed to getCached, or nil to read directly. |
Retornos
| 1 | boolean | nil | True when value.tree is within the tree count, otherwise nil. |
|---|---|---|
| 2 | string | nil | Reason for nil: the tree count's reason, or talent-tree-unavailable. |
Ediciones
Las funciones auxiliares integradas se registran en todas las ediciones. Lo que cambia es la API del juego que leen; donde falta alguna, la función auxiliar recurre a una alternativa o devuelve nil con un motivo.
No lee directamente ninguna API del juego.
Cómo la llama el addon
- Árbol de talentos principal (evaluate)
local exists,why=treeExists(value,cache);if not exists then return nil,why end - Puntos del árbol de talentos (evaluate)
local exists,why=treeExists(value,cache);if not exists then return nil,why end
Dependencias
platform(builtin:Conditions/talent.lua:platform)
Código fuente
Conditions/talent.lua, línea 652. Solo lectura en el juego; Duplicar crea una copia editable.
Conditions.talent.treeExists(value, cache)
local count,reason=addon.getCached(cache,platform.GetTalentTreeCount,platform)
if count==nil then return nil,reason end
if value.tree>count then return nil,'talent-tree-unavailable' end
return true