Casts a from the spellbook. Only protected (i.e. usable only by the Blizzard UI) if the given id
corresponds to a spell which can be cast (not a passive spell) and is not a trade skill; can be used by addons to cast the "spells" that open trade skill windows.
See also Spell functions.
Signature:
CastSpell(id,
"bookType")
Arguments:
id
- Index of a spell in the spellbook (number
, spellbookID)bookType
- Type of spellbook (string
)pet
- The pet's spellbookspell
- The player's spellbook
This function is protected and can only be called by the Blizzard user interface