Thread Tools Display Modes
11-18-06, 09:24 AM   #1
Aule
A Fallenroot Satyr
 
Aule's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 20
Way to Trap a Spell Cast

So far I'm trapping the casting of a spell by overriding CastSpellByName and UseAction, but there seem to be other ways to cast a spell as well because my AddOn is unaware of spellcasts coming from the Necrosis AddOn.

Anyone know what the other functions are that I need to trap?

Thanks!!
__________________
"Any society that would trade liberty for security will lose both and deserve neither."
- Benjamin Franklin
  Reply With Quote
11-18-06, 09:51 AM   #2
JIM the Inventor
A Cyclonian
 
JIM the Inventor's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 42
A third function, simply named CastSpell, also contributes to spellcasts. It gets passed a number identifier that is dependent on the alphabetized order of spells in the spellbook (but the order is split across 4 talent categories), and the word "spell".

You can simplify this whole procedure, however. In WoW 2.0, Blizzard has added a new event called "UNIT_SPELLCAST_SENT". It's a dream come true. Consult Iriel's patch notes for details.

But really, I can't help but endorse my own library. Included in my AddOn, JIM's Cooldown Pulse, are 3 files (two SpellCast files and ItemUse) that gather information about spellcasts AND items. Spells seem to work flawlessly, items almost so. If you're interested in it, you can just pull the files out of the ZIP for your own project (JIM_toolbox subfolder): http://www.wowinterface.com/download...php?s=&id=6192
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Way to Trap a Spell Cast


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off