GetSpellDefinition
Jump to navigation
Jump to search
getSpellDefinition
Finds one spell definition by numeric identifier or stable key.
Syntax
table getSpellDefinition(int|string spell)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
spell |
string | yes | A numeric spell id or stable spell key, including values from the global SPELL table.
|
Returns
Returns the spell definition table, or false when no matching spell exists.
Examples
Inspect the Fire Arrow definition:
local spell = getSpellDefinition(SPELL.FIRE_ARROW)
if spell then
print("Mana cost:", spell.manaCost)
print("Damage:", spell.damage)
end
Notes
- Available only in server-side resource scripts.
- Definitions include targeting, damage, timing, projectile and implementation metadata.