Call as
Core.creature_conditions.configuredID(key)
Record the dependency Core.creature_conditions.configuredID, 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
Maps a stored CREATURE condition key to its numeric creature type, from BEAST (1) to GAS_CLUUD (13). GAS_CLUUD is the stored key's existing spelling, kept on purpose; any other key returns nil.
Arguments
| Name | Type | What it does |
|---|---|---|
key | string | Stored creature type key, such as "UNDEAD". |
Returns
| 1 | number | nil | Creature type number, or nil for an unknown key. |
|---|
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
Core.creature_conditions.GetConditionCreatureTypeMatchlocal expected=configuredID(key)
Source
Core/creature_conditions.lua, line 17. Read only in game; Duplicate makes an editable copy.
Core.creature_conditions.configuredID(key)
if key=='BEAST' then return 1
elseif key=='DRAGONKIN' then return 2
elseif key=='DEMON' then return 3
elseif key=='ELEMENTAL' then return 4
elseif key=='GIANT' then return 5
elseif key=='UNDEAD' then return 6
elseif key=='HUMANOID' then return 7
elseif key=='CRITTER' then return 8
elseif key=='MECHANICAL' then return 9
elseif key=='OTHER' then return 10
elseif key=='TOTEM' then return 11
elseif key=='NONCOMBAT_PET' then return 12
elseif key=='GAS_CLUUD' then return 13 end