Referencia › Referencia de funciones › Conditions

Conditions.talent.treeExists

dependencia

Llamar como

Conditions.talent.treeExists(value, cache)

Registra la dependencia Conditions.talent.treeExists y después llámala con ese nombre. Una llamada con espacio de nombres no pasa self: usa una llamada con dos puntos o pasa el objeto tú mismo.

Qué hace

Checks that a talent condition's tree index exists on this client, using the cached platform talent tree count.

Argumentos

NombreTipoQué hace
valuetableCondition settings with a numeric tree field.
cachetable | nilEvaluation-pass cache passed to getCached, or nil to read directly.

Retornos

1boolean | nilTrue when value.tree is within the tree count, otherwise nil.
2string | nilReason 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 usa una alternativa o devuelve nil con un motivo.

No lee directamente ninguna API del juego.

Cómo la llama el addon

Dependencias

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

Volver a Referencia de funciones