I have a copy of the code kegz used to fix ac on his server if anyone is interested.
Actually I found it in his github as well. Here you go
https://github.com/epicemu/Server/bl...one/attack.cpp
Code:
if(RuleB(Combat, UseIntervalAC)) {
//int8 leveldif = ((other->GetLevel()) - (this->GetLevel())); // //AC Damage Reduction Level Diff - Kegz @ EpicEmu.com
damage = ((max_dmg+eleBane) - (otherac * acdiv/100.0f)); //AC Damage Reduction - Kegz @ EpicEmu.com
}
else {
//float acdiv2 = 0.25;
//int otherac = other->GetAC();
//damage = ((max_dmg+eleBane) - (otherac * acdiv2/100.0f));
damage = ((max_dmg+eleBane) - (otherac * acdiv/100.0f));
}
//check if we're hitting above our max or below it.
if((min_dmg+eleBane) != 0 && damage < (min_dmg+eleBane)) {
mlog(COMBAT__DAMAGE, "Damage (%d) is below min (%d). Setting to min.", damage, (min_dmg+eleBane));
//damage = (min_dmg+eleBane);
damage = ((min_dmg+eleBane) - (otherac * acdiv/100.0f));
}
if((max_dmg+eleBane) != 0 && damage > (max_dmg+eleBane)) {
mlog(COMBAT__DAMAGE, "Damage (%d) is above max (%d). Setting to max.", damage, (max_dmg+eleBane));
//damage = (max_dmg+eleBane);
damage = ((max_dmg+eleBane) - (otherac * acdiv/100.0f));
}