SpellInfo

A value shape that methods take or return.

Group
player
Methods
None
Fields
8

Getting one

player:magic():autocastSpell()
player:magic():spellInfo(…)
player:magic():castability(…).spell

Fields

FieldTypeDescription
namestringThe spell's name, as magic:cast takes it.
levelnumberMagic level required.
spellbookSpellbookWhich spellbook it belongs to.
widgetIdnumberPacked id of the spell's icon in the spellbook interface.
autocastIdnumber?The autocast slot id.
spriteIdnumber?The spell's icon sprite.
target"none" | "npcOrPlayer" | "npc" | "player" | "groundItem" | "object" | "inventory" | "groundItemOrInventory"What the spell is cast on; "none" for a spell magic:cast casts as it is.
requiredRunes{ { rune: Rune, quantity: number } }Rune cost, each { rune, quantity }.

Returned by

MethodReturnsDescription
Magic.autocastSpellSpellInfo?The spell currently set to autocast.
Magic.spellInfoSpellInfoA spell's static facts: level, runes, requirements.

Field details

autocastId

autocastId: number?

The autocast slot id.

Returns
nil when the spell cannot be autocast.

spriteId

spriteId: number?

The spell's icon sprite.

Returns
nil when it has none.