Sophisse
03-05-2005, 04:00 AM
Hi guys, I'm having a problem with my add on. I want to be able to determine the spell target in order to be able to announce to group, and some other processing.
This is easy to determine in the ordinary spellcast scenario, where the caster targets then casts - you just say targetname=UnitName("target");
But if the caster does not have a target some spells (like healing spells) will sit in a SpellIsTargeting state until a target is selected by the caster - by clicking a party member hotkey, or clicking on the target.
In that case, the spell target never actually shows up as a target for the user, and UnitName("target") returns the user's target which will be something else (or nil).
So I am looking for a way to determine the true target of a spell when processing the SPELLCAST_START event. Anybody know?
And, is there a better spot to discuss issues like this?
Thanks,
Sophisse <Noctis> 44 priest on Whisperwind
This is easy to determine in the ordinary spellcast scenario, where the caster targets then casts - you just say targetname=UnitName("target");
But if the caster does not have a target some spells (like healing spells) will sit in a SpellIsTargeting state until a target is selected by the caster - by clicking a party member hotkey, or clicking on the target.
In that case, the spell target never actually shows up as a target for the user, and UnitName("target") returns the user's target which will be something else (or nil).
So I am looking for a way to determine the true target of a spell when processing the SPELLCAST_START event. Anybody know?
And, is there a better spot to discuss issues like this?
Thanks,
Sophisse <Noctis> 44 priest on Whisperwind