Referencia › Referencia de funciones › Conditions

Conditions.talent.integer

dependencia

Llamar como

Conditions.talent.integer(value, minimum, maximum)

Registra la dependencia Conditions.talent.integer 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

True when value is a whole number between minimum and maximum, inclusive.

Argumentos

NombreTipoQué hace
valueanyValue to check.
minimumnumberSmallest accepted value.
maximumnumberLargest accepted value.

Retornos

1booleanTrue when the value passes the check.

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

  • Árbol de talentos principal (valid)
    return integer(value.tree,1,16)
  • Talento (valid)
    return integer(value.node,1,2147483647) and (value.entry==nil or integer(value.entry,1,2147483647))
  • Puntos del árbol de talentos (evaluate)
    if not integer(tree.pointsSpent,0,512) then return nil,'talent-points-unavailable' end
  • Conditions.talent.gridWidget
    local chosen=value.layout=="grid" and integer(value.value,1,18) and value.value or nil
  • Conditions.talent.group
    if platform:GetClientInfo().family=="progression" and integer(spec,1,4) then return spec end
  • Conditions.talent.info
    if traitShape(value) then return integer(value.node,1,2147483647) and platform:GetTraitTalentIdentity(value.node,value.entry,value.spell) or nil end
  • Conditions.talent.legacySlot
    return value.layout==nil and value.tree==nil and value.talent==nil and integer(value.value,1,21)
  • Conditions.talent.treeName
    local name=integer(value.tree,1,16) and addon.TalentTrees.Name(value.tree,addon.TalentTrees.ContextClass(),group(spec))

Código fuente

Conditions/talent.lua, línea 47. Solo lectura en el juego; Duplicar crea una copia editable.

Conditions.talent.integer(value, minimum, maximum)
    return type(value)=="number" and value>=minimum and value<=maximum and value%1==0

Volver a Referencia de funciones