Call as
Conditions.talent.integer(value, minimum, maximum)
Record the dependency Conditions.talent.integer, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.
What it does
True when value is a whole number between minimum and maximum, inclusive.
Arguments
| Name | Type | What it does |
|---|---|---|
value | any | Value to check. |
minimum | number | Smallest accepted value. |
maximum | number | Largest accepted value. |
Returns
| 1 | boolean | True when the value passes the check. |
|---|
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
It reads no game API directly.
How the addon calls it
- Primary Talent Tree (valid)
return integer(value.tree,1,16) - Talent (valid)
return integer(value.node,1,2147483647) and (value.entry==nil or integer(value.entry,1,2147483647)) - Talent Tree Points (evaluate)
if not integer(tree.pointsSpent,0,512) then return nil,'talent-points-unavailable' end Conditions.talent.gridWidgetlocal chosen=value.layout=="grid" and integer(value.value,1,18) and value.value or nilConditions.talent.groupif platform:GetClientInfo().family=="progression" and integer(spec,1,4) then return spec endConditions.talent.infoif traitShape(value) then return integer(value.node,1,2147483647) and platform:GetTraitTalentIdentity(value.node,value.entry,value.spell) or nil endConditions.talent.legacySlotreturn value.layout==nil and value.tree==nil and value.talent==nil and integer(value.value,1,21)Conditions.talent.treeNamelocal name=integer(value.tree,1,16) and addon.TalentTrees.Name(value.tree,addon.TalentTrees.ContextClass(),group(spec))
Source
Conditions/talent.lua, line 47. Read only in game; Duplicate makes an editable copy.
Conditions.talent.integer(value, minimum, maximum)
return type(value)=="number" and value>=minimum and value<=maximum and value%1==0