Actually, after taking a 10th look at the code, I think I know what went wrong:
Code:
void Mob::TryDotCritical(int16 spell_id, Mob *caster, int &damage)
{
if(!caster)
return;
float critChance = 0.00f;
switch(GetAA(aaCriticalAffliction))
{
case 1:
critChance += 0.03f;
break;
case 2:
critChance += 0.06f;
break;
case 3:
critChance += 0.10f;
break;
default:
break;
}
switch (GetAA(aaImprovedCriticalAffliction))
{
case 1:
critChance += 0.03f;
break;
case 2:
critChance += 0.06f;
break;
case 3:
critChance += 0.10f;
break;
default:
break;
}
// since DOTs are the Necromancer forte, give an innate bonus
// however, no chance to crit unless they've trained atleast one level in the AA first
if (GetClass() == NECROMANCER && critChance > 0.0f){
critChance += 0.05f;
}
if (critChance > 0.0f){
if (MakeRandomFloat(0, 1) <= critChance)
{
damage *= 2;
}
}
}
We're basically looking at
this, which is going the be the Mob affected by the spell, not the
caster. Should just have to add
caster-> to the beginnings of those, and they should look at the right Mob.
I just compiled & tested, and DoTs now crit.