View Single Post
04/21/14, 02:55 PM   #17
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by mikethecoder4 View Post
Hmm this is intersting. What is sourceType exactly? thought it was the damage type.

However, wouldn't this code increase the counter every time I did damage?
No, damage type is damageType
sourceType is of CombatUnitType, as is targetType.

You need to check sourceType and sourceName, because you can't prevent people naming themselves Scamp or Wolf.

However, wouldn't this code increase the counter every time I did damage?
You still need to filter out all action results you don't care about, too, of course. My snippet is just to verify that it is the player whose event you process.