Call as
Conditions.totem.amount(value)
Record the dependency Conditions.totem.amount, 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 a totem condition's comparison is usable: value.value is a nonnegative finite number and value.operator is one of addon.operators.
Arguments
| Name | Type | What it does |
|---|---|---|
value | table | Saved condition settings with operator and value fields. |
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
- Totem Time Remaining (valid)
return element(value) and amount(value) - Specific Totem Time Remaining (valid)
return specific(value) and amount(value)
Source
Conditions/totem.lua, line 77. Read only in game; Duplicate makes an editable copy.
Conditions.totem.amount(value)
return type(value.value)=="number" and value.value==value.value and value.value>=0 and value.value<math.huge
and type(value.operator)=="string" and addon.isin(addon.operators,value.operator)