Chiamala come
Conditions.talent.treeExists(value, cache)
Registra la dipendenza Conditions.talent.treeExists, 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
Checks that a talent condition's tree index exists on this client, using the cached platform talent tree count.
Argomenti
| Nome | Tipo | Cosa fa |
|---|---|---|
value | table | Condition settings with a numeric tree field. |
cache | table | nil | Evaluation-pass cache passed to getCached, or nil to read directly. |
Valori restituiti
| 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. |
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
- Albero dei talenti principale (evaluate)
local exists,why=treeExists(value,cache);if not exists then return nil,why end - Punti nell'albero dei talenti (evaluate)
local exists,why=treeExists(value,cache);if not exists then return nil,why end
Dipendenze
platform(builtin:Conditions/talent.lua:platform)
Sorgente
Conditions/talent.lua, riga 652. Nel gioco è in sola lettura; Duplica crea una copia modificabile.
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