Code:
if (attacker->IsClient()) {
int modAA = 100;
switch (attacker->CastToClient()->GetAA(aaPrecisionofthePathfinder)) {
case 1:
modAA += 2;
break;
case 2:
modAA += 4;
break;
case 3:
modAA += 6;
break;
}
chancetohit = ((chancetohit * modAA) / 100);
}
In regards to the first two it is correct because mod starts at 100. So with rank 3 you would have a mod of 106. Assume you have 50% chance to hit: ((50 * 106) / 100) = 53 chance to hit.