Call as
Conditions.bossmod.validID(value)
Record the dependency Conditions.bossmod.validID, 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, the accepted shape of a saved boss-mod encounter or spell ID.
Arguments
| Name | Type | What it does |
|---|---|---|
value | any | Value to check, usually a saved ID. |
Returns
| 1 | boolean | True 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
- Boss Mod Encounter (print)
if validID(value.encounter) then - Boss Mod Timer (print)
local spell = validID(value.spell) and addon:SpellLabel(value.spell) or L["<spell>"] Conditions.bossmod.idEditorchanged(validID(id) and id or nil)
Source
Conditions/bossmod.lua, line 51. Read only in game; Duplicate makes an editable copy.
Conditions.bossmod.validID(value)
return type(value) == "number" and value > 0 and value < 2^31 and value % 1 == 0