SpellLearning
constSpellLearning:object
Defined in: client/api.d.ts:5888
Standalone native spell lessons. Resources decide progression; this API does not grant spells.
Type Declaration
Section titled “Type Declaration”cancel()
Section titled “cancel()”cancel(
requestId):boolean
Cancels a request owned by the calling resource. False for stale, foreign, or already settled requests.
Parameters
Section titled “Parameters”requestId
Section titled “requestId”number
Returns
Section titled “Returns”boolean
define()
Section titled “define()”define(
id,lesson):SpellLessonDefineResult
Adds or replaces one of this resource’s lessons in the native lesson table, then start(id) runs it like a stock one. Works before world entry; refused while that lesson runs. Gone when the resource stops.
Parameters
Section titled “Parameters”string
Letters, digits and _, up to 32; not a stock name. Scoped to this resource.
lesson
Section titled “lesson”Returns
Section titled “Returns”lessons()
Section titled “lessons()”lessons():
string[]
The ids this resource has defined.
Returns
Section titled “Returns”string[]
start()
Section titled “start()”start(
spell):SpellLearningRequest
Starts one native lesson in a ready world with idle native UI. Listen for spellLearningFinished before starting. One request may be active globally.
Parameters
Section titled “Parameters”string
Exact name from supportedSpells, such as Revelio, or an id this resource defined.
Returns
Section titled “Returns”state()
Section titled “state()”state():
SpellLearningState|null
Reads the caller’s active lesson; null for other resources or after result delivery.
Returns
Section titled “Returns”SpellLearningState | null
supportedSpells()
Section titled “supportedSpells()”supportedSpells():
string[]
Lists the 29 verified rows in the shipping native spell lesson table.
Returns
Section titled “Returns”string[]
undefine()
Section titled “undefine()”undefine(
id):boolean
Removes one of this resource’s lessons. False when it has none by that id, or it is running.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean