Call as
Conditions.equipment.subclassID(value)
Record the dependency Conditions.equipment.subclassID, 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 whole number from 0 to 31, the range of weapon subclass IDs WEAPON_TYPE accepts.
Arguments
| Name | Type | What it does |
|---|---|---|
value | any | Value to check. |
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
- Weapon Type (valid)
if value.subclass ~= nil then return value.kind == nil and subclassID(value.subclass) end
Source
Conditions/equipment.lua, line 95. Read only in game; Duplicate makes an editable copy.
Conditions.equipment.subclassID(value)
return type(value) == "number" and value >= 0 and value <= 31 and value % 1 == 0