Hi Phanx,
as usual thanks for your precious inputs.
About the second iussue, the
Lua Code:
destGUID == UnitGUID("player")
I wrote it in this way here to let others readers understand what I mean, but in the addon code it was:
Lua Code:
if destGUID == playerGUID or UnitInParty(destName) then
where PlayerGUID is initialized as you suggested.
About the other part of the problem, what I'd like to understand was if the function:
was true also for raids and battleground (even if the units are in differents groups).
This because I was not able to find something like
UnitInGroup() (even if there is a function:
IsInGroup() for the player) that could be fine for all of them (party/raid/bg) and a I was a little bit confused about this.
Your answer is, as usual, perfect because UnitClass(name) works exactly I need.
Thanks again for all your answers.
P.s.
I am writing a "fatality" like addon, named autopsy. This because the most part of the code is common with the other addon I wrote on gankers and because the "real" fatality addon continues to fire a lot of LUA errors on the blizzard raidframe. I'll post the code here for a "final" review, if someone wants to check, as soon as it is refined a little bit.