Thread Tools Display Modes
08-07-13, 08:03 PM   #1
launchcodemexico
A Defias Bandit
Join Date: Aug 2013
Posts: 2
announce for casts in progress on the player

i want to write an addon that performs the following:

if ([Ability1, Ability2,... AbilityX] is being cast upon you from any NPC's or players) -> announce

for example, if a warlock somewhere/anywhere has targeted you and has begun to cast Chaos Bolt, and it's an ability you've selected to parse, an announcement will be made on screen.

does the API allow for such calls?
  Reply With Quote
08-07-13, 09:09 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
The combat log doesn't provide a target for SPELL_CAST_START events so the only way you could guess at a target would be if someone was targeting the warlock and you got which unit the warlock was targeting when they started casting, which isn't necessarily the target of the spell since they could be using mouseover or focus macros.
  Reply With Quote
08-07-13, 09:11 PM   #3
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by semlar View Post
The combat log doesn't provide a target for SPELL_CAST_START events so the only way you could guess at a target would be if someone was targeting the warlock and you got which unit the warlock was targeting when they started casting, which isn't necessarily the target of the spell since they could be using mouseover or focus macros, but I think that would be the best you could do.
With the re-introduction of cast bars on nameplates, would using Nameplates as a reference work? Not sure if you can get target info from Nameplates, though.
  Reply With Quote
08-07-13, 10:07 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Nope. Watching nameplate castbars will still only tell you that someone, somewhere, is casting the spell, not who they're casting it on. You can only find out who they're targeting if you target them or mouse over them (or their nameplate) so they get a unit token.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
08-07-13, 10:14 PM   #5
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Phanx View Post
Nope. Watching nameplate castbars will still only tell you that someone, somewhere, is casting the spell, not who they're casting it on. You can only find out who they're targeting if you target them or mouse over them (or their nameplate) so they get a unit token.
Ah well, was a bit much to hope for
  Reply With Quote
08-08-13, 05:11 AM   #6
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Kollektiv's SpellAlerter used to be able to do this, but I have no idea if it works for MoP.

[EDIT] There's a fan update of spellalerter for 5.1.

Last edited by ravagernl : 08-08-13 at 05:14 AM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » announce for casts in progress on the player


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