Thread Tools Display Modes
07-02-06, 12:57 PM   #1
Aule
A Fallenroot Satyr
 
Aule's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 20
Unhappy Determining spell cast by SPELLCAST_STOP event & Catching Spell Breaks

Two questions:


1) I'm writing a Warlock AddOn and I need to detect when certain types of spells are cast. I'm currently trapping the SPELLCAST_STOP event, but I'm not sure how to determine the spell that generated the event. I've tried overriding the CastSpell and CastSpellByName global functions but I'm having no luck there (code attached below).


2) What event should I be looking for if a mob breaks a spell with a duration? (break Banish early for instance).


THANKS!!


My Non-Functional Global Function Override Attempt:

[code]GameCastSpellByName = CastSpellByName;
function My_OnCastSpellByName(spellString)
println("TEST::: CastSpellByName!!" .. spellString);
GameCastSpellByName(spellString);
end
CastSpellByName = My_OnCastSpellByName;


My_GameCastSpell = CastSpell;
function My_OnCastSpell(spellId, spellBookTabNum)
local spellName, spellRank = GetSpellName(spellId, spellbookTabNum);
println("TEST::: CastSpell!!" .. spellName);
My_GameCastSpell(spellId, spellBookTabNum);
end
CastSpell = My_OnCastSpell;[\code]
  Reply With Quote
07-04-06, 11:04 AM   #2
Esamynn
Featured Artist
Premium Member
Featured
Join Date: Jan 2005
Posts: 395
1) I think this will help: http://www.wowwiki.com/HOWTO:_Detect...nt_Cast_Spells

2) SPELLCAST_INTERRUPTED
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Determining spell cast by SPELLCAST_STOP event & Catching Spell Breaks


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