About the issue with buff values getting messed up, I believe that is just a client issue. I don't know why it happens, but using #mystats will still display the correct stat values, so I'm not too concerned with that issue.
I did run into another question which I am curious if anyone can answer. I wanted to put in a way to make damage spells only do their normal unmodified damage if the caster was casting the spell on them self. To do this, I stored the original damage, and then after modifying it, I just checked if the caster and target were equal.
Code:
if (caster && caster->GetTarget())
{
if (caster->GetTarget() == caster)
{
effect_value = base_value;
}
}
This does work; however, the problem I have run into is if you cast a DoT on a monster and then target yourself, it will count you as the target and not the affected monster. Does anyone else know a better way to keep DoTs from doing increased damage to the caster? I only ask because spells like necro conversions are doing really high damage to the caster.