SpellMixin

From Wowpedia
Jump to: navigation, search

The SpellMixin interface was added to get spell data without the risk of it returning empty data.[1]

Source: FrameXML\ObjectAPI\Spell.lua

API

Methods

Example

Some spell data may not have been cached from the server yet. You can use SpellMixin:ContinueOnSpellLoad() to asynchronously query the data.

Prints the name and description for a spell.

local spell = Spell:CreateFromSpellID(139)

spell:ContinueOnSpellLoad(function()
	local name = spell:GetSpellName()
	local desc = spell:GetSpellDescription()
	print(name, desc) -- "Renew", "Fill the target with faith in the light, healing for 295 over 15 sec."
end)

Patch changes

See also

External links

References