Call as
Conditions.bossmod.validCompare(value)
Record the dependency Conditions.bossmod.validCompare, 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
Validation check for a boss-mod condition's comparison: true when value.operator is one of addon.operators and value.value is a finite number of zero or more.
Arguments
| Name | Type | What it does |
|---|---|---|
value | table | Saved condition settings with operator and value fields. |
Returns
| 1 | boolean | True when both the operator and the threshold are usable. |
|---|
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
- Boss Mod Encounter Stage (valid)
return validCompare(value) - Boss Mod Timer (valid)
return validID(value.spell) and validCompare(value)
Dependencies
Functions.presentation.compareString→Functions.presentation.compareStringFunctions.presentation.nullable→Functions.presentation.nullableFunctions.values.compare→Functions.values.compareFunctions.values.isin→Functions.values.isin
Source
Conditions/bossmod.lua, line 58. Read only in game; Duplicate makes an editable copy.
Conditions.bossmod.validCompare(value)
return value.operator ~= nil and Functions.values.isin(addon.operators, value.operator)
and type(value.value) == "number" and value.value >= 0 and value.value < math.huge