Reference › Function reference › Conditions

Conditions.raid_marks.validMark

dependency

Call as

Conditions.raid_marks.validMark(mark)

Record the dependency Conditions.raid_marks.validMark, 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

Checks a saved marker mode or a comma-separated list of distinct marker names.

Arguments

NameTypeWhat it does
markanyThe saved marker choice.

Returns

1booleanTrue when the choice is valid.

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/raid_marks.lua, line 70. Read only in game; Duplicate makes an editable copy.

Conditions.raid_marks.validMark(mark)
    if mark == "any" or mark == "none" then return true end
    if type(mark) ~= "string" or mark == "" or #mark > 64 then return false end
    local seen, count = {}, 0

    for name in (mark .. ","):gmatch("([^,]*),") do
        if MARK_NUMBER[name] == nil or seen[name] then return false end
        seen[name] = true
        count = count + 1
    end

    return count >= 1

Back to Function reference