Reference › Function reference › Conditions

Conditions.bossmod.validCompare

dependency

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

NameTypeWhat it does
valuetableSaved condition settings with operator and value fields.

Returns

1booleanTrue 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

Dependencies

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

Back to Function reference