Chiamala come
Core.creature_conditions.configuredID(key)
Registra la dipendenza Core.creature_conditions.configuredID, poi chiamala con quel nome. Una chiamata con spazio dei nomi non passa self: usa una chiamata con i due punti o passa tu l'oggetto.
Cosa fa
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.
Argomenti
| Nome | Tipo | Cosa fa |
|---|---|---|
key | string | Stored creature type key, such as "UNDEAD". |
Valori restituiti
| 1 | number | nil | Creature type number, or nil for an unknown key. |
|---|
Edizioni
Le funzioni di supporto integrate sono registrate su ogni edizione. Ciò che cambia è l'API di gioco che leggono; dove ne manca una, la funzione di supporto ripiega su un'alternativa o restituisce nil con un motivo.
Non legge direttamente alcuna API di gioco.
Come la chiama l'addon
Core.creature_conditions.GetConditionCreatureTypeMatchlocal expected=configuredID(key)
Sorgente
Core/creature_conditions.lua, riga 17. Nel gioco è in sola lettura; Duplica crea una copia modificabile.
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