Thread Tools Display Modes
09-01-19, 06:30 AM   #1
Basil2
An Aku'mai Servant
Join Date: Feb 2015
Posts: 30
Classic: how to replace UnitCastingInfo?

This function does not exist on Classic (

What is the simplest way to detect that player's character is casting a spell?

Detect of mobs or other players casting is also welcome
  Reply With Quote
09-01-19, 11:54 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by Basil2 View Post
This function does not exist on Classic (

What is the simplest way to detect that player's character is casting a spell?

Detect of mobs or other players casting is also welcome
I had this problem with nUI. Took a while to figure it out but here it is ..

UnitChannelInfo(unit) doesn't exist .. but there is ChannelInfo() to get the players channel info
UnitCastingInfo(unit) doesn't exist .. but there is CastingInfo() to get the players casting info

I thought there was a way to get the targets casting and channeling info but maybe you can't get the details and I just remembered a time more recent than classic.
__________________
  Reply With Quote
09-01-19, 07:52 PM   #3
kurapica.igas
A Chromatic Dragonspawn
Join Date: Aug 2011
Posts: 152
You can register the COMBAT_LOG_EVENT_UNFILTERED to check combat event like SPELL_CAST_START, SPELL_CAST_SUCCESS, SPELL_MISSED, SPELL_CAST_FAILED, SPELL_INTERRUPT.

But blizzard has removed the spell id in those events, so you only have a spell name and not spell rank in those event. We won't get the exactly cast duration but good enough to show the cast bar.
  Reply With Quote
09-02-19, 05:22 AM   #4
Basil2
An Aku'mai Servant
Join Date: Feb 2015
Posts: 30
It works, thank you much!
  Reply With Quote
09-02-19, 06:07 AM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by kurapica.igas View Post
You can register the COMBAT_LOG_EVENT_UNFILTERED to check combat event like SPELL_CAST_START, SPELL_CAST_SUCCESS, SPELL_MISSED, SPELL_CAST_FAILED, SPELL_INTERRUPT.

But blizzard has removed the spell id in those events, so you only have a spell name and not spell rank in those event. We won't get the exactly cast duration but good enough to show the cast bar.
Thanks, that may be how nUI dealt with it before, I'll have to look into that at some point I guess.
__________________
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Classic: how to replace UnitCastingInfo?

Thread Tools
Display Modes

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