Lore archive · Warcraft Wiki, 2023 dump
SpellMixin
Last wiki revision 2023-01-28
The SpellMixin interface was added to get spell data without the risk of it returning empty data.
- Source: FrameXML\ObjectAPI\Spell.lua
- Spell:CreateFromSpellID( spellID ) : spell - Creates an object from a spell ID.
- SpellMixin:SetSpellID( spellID )
- SpellMixin:GetSpellID : spellID
- SpellMixin:Clear
- SpellMixin:IsSpellEmpty : boolean
- SpellMixin:IsSpellDataCached : boolean
- SpellMixin:GetSpellName : name
- SpellMixin:GetSpellTexture : texture
- SpellMixin:GetSpellSubtext : subtext
- SpellMixin:GetSpellDescription : description
- SpellMixin:ContinueOnSpellLoad( callbackFunction )
- SpellMixin:ContinueWithCancelOnSpellLoad( callbackFunction ) : cancelFunc
Some spell data - such as subtext and description - are load on demand. You can use SpellMixin:ContinueOnSpellLoad to asynchronously query the data.
Certain spells might not return information when using. For example spellID 10444 will return info for and but will have , possibly because of an error with other data like the spell description. This will make never fire the callback. One workaround is to use with a timeout or directly listen to.
- ->
Source
https://warcraft.wiki.gg/wiki/SpellMixin · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.