I'm trying to detect when a spell is cast on people with COMBAT_LOG_EVENT_UNFILTERED but so far the 6th and 7th parameters (destGUID and destName) are always empty or nil? how are you supposed to get the destName from that?
if you're hoping to find what enemies are casting at you/party members, then you're going to be disappointed. CLEU doesn't fill in these fields for enemies with SPELL_CAST_START. they ARE filled in for the SPELL_CAST_COMPLETE, tho. for friendlies, you get data for targets on all events i believe.
Ugh, checking for SPELL_CAST_COMPLETE would kinda defeat the purpose of the addon. So is there no other way to detect if an enemy is casting a spell on you or your party? without targeting the unit that is.
The whole point is that you cannot write addons that can proactively do things about spells, hence the destination is only available when the spell lands not when it starts casting.
Ugh, checking for SPELL_CAST_COMPLETE would kinda defeat the purpose of the addon. So is there no other way to detect if an enemy is casting a spell on you or your party? without targeting the unit that is.
On top of the intentional Blizzard design of not letting you know who the target of a spell is until it is cast successfully, targeting the enemy to find out what he is currently targeting is almost always going to be error prone.
Any number of people use mouseover macros or target=something macros and their current target isn't always the target of a spell being casted.
Even if a mob starts casting a spell and is taunted while casting ? I seem to remember that the mob targets the one who taunted but the spell is launched on the first target.
Yes, but player spells work the same way. You start casting on mob x, and mid cast target mob y. The spell still lands on mob x.
The difference is that mobs never mouse over targets. When a mob starts casting on a player, that player gets hit with the spell regardless of what player the mob has targeted by the end of the cast.
I would just give you a link:
On top of the intentional Blizzard design of not letting you know who the target of a spell is until it is cast successfully, targeting the enemy to find out what he is currently targeting is almost always going to be error prone.
Any number of people use mouseover macros or target=something macros and their current target isn't always the target of a spell being casted.
The difference is that mobs never mouse over targets. When a mob starts casting on a player, that player gets hit with the spell regardless of what player the mob has targeted by the end of the cast.