WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Classic: how to replace UnitCastingInfo? (https://www.wowinterface.com/forums/showthread.php?t=57409)

Basil2 09-01-19 06:30 AM

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 :)

Xrystal 09-01-19 11:54 AM

Quote:

Originally Posted by Basil2 (Post 333501)
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.

kurapica.igas 09-01-19 07:52 PM

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.

Basil2 09-02-19 05:22 AM

It works, thank you much!

Xrystal 09-02-19 06:07 AM

Quote:

Originally Posted by kurapica.igas (Post 333524)
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.


All times are GMT -6. The time now is 06:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI