GetSpellDefinition: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 32: | Line 32: | ||
* Definitions include targeting, damage, timing, projectile and implementation metadata. | * Definitions include targeting, damage, timing, projectile and implementation metadata. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Magic Functions]] | [[Category:Magic Functions]] | ||
Latest revision as of 09:53, 15 August 2026
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.