Reference › Function reference › Functions

Functions.presentation.predicate

public

Call as

Functions.presentation.predicate(operator, primary)

Record it as a dependency named Functions.presentation.predicate (accepting the completion does this), then call it by that name.

What it does

Create a typed comparison predicate for a named condition phrase. Positive wording uses the original captured operator map and negative wording uses the current negated operator map. A primary predicate takes precedence over qualifiers; only the first eligible predicate negates. Unknown operators use the existing operator placeholder. This formats wording without comparing values or evaluating a condition.

Arguments

NameTypeWhat it does
operatorstringComparison operator key, such as EQUALS or LESSTHAN.
primaryboolean | nilTrue marks the main comparison to negate; false or nil leaves it eligible only when no primary predicate exists.

Returns

1RMConditionPredicateTransient typed predicate used as a named phrase value; do not persist it as condition data.

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

and 9 more: Health Within Range (print), Health Percentage Within Range (print), Health Percentage Count Within Range (print), Health Count Within Range (print), Mana Within Range (print), Mana Percentage Within Range (print), Mana Percentage Count Within Range (print), Mana Count Within Range (print), Item Set Pieces Equipped (print)

Dependencies

Source

Functions/presentation.lua, line 94. Read only in game; Duplicate makes an editable copy.

Functions.presentation.predicate(operator, primary)
    local positive=addon.nullable(operators[operator], L["<operator>"])
    return addon:CreateConditionSummaryPredicate(positive, (addon.negatedOperators or {})[operator], primary)

Back to Function reference