Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
|This function is PROTECTED, and can only be called from Blizzard code.|
Casts a specificed spell
- Integer - Spell ID.
- String - Spellbook type. Valid values are "spell" (BOOKTYPE_SPELL) and "pet" (BOOKTYPE_PET). All players use "spell". Hunters and Warlocks may have additional tabs on the bottom when pets are summoned. Warlocks have Demon, which corresponnds to "pet" spellbook type.
- Casts the first spell listed in the spellbook (usually Alchemy or Attack).
Use "spell" or SpellBookFrame.booktype as the spellbookType for any non-pet spell. The id is counted from 1 through all spell types (tabs on the right side of SpellBookFrame). Pet spells also start from 1. (See example above). The CastSpell function can not be used outside Blizzard-signed code except when "casting" trade skills (e.g. Cooking, Alchemy, etc.).