Reference › Function reference › Conditions

Conditions.engraving.identifier

dependency

Call as

Conditions.engraving.identifier(value)

Record the dependency Conditions.engraving.identifier, 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 positive whole number below 2^31; RUNE_ENGRAVED uses it to validate a saved rune ID.

Arguments

NameTypeWhat it does
valueanyValue to check.

Returns

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

  • Engraved Rune (valid)
    if value.rune ~= nil then return identifier(value.rune) and value.spell == nil end

Source

Conditions/engraving.lua, line 43. Read only in game; Duplicate makes an editable copy.

Conditions.engraving.identifier(value)
    return type(value) == "number" and value > 0 and value < 2147483648 and value % 1 == 0

Back to Function reference