2010-10-16, 09:28 PM
From http://www.southperry.net/showthread.php?t=31437
Simplified to remove the if stuff, percentage based damage only.
v5 is effectively truncating the percentage to a whole number (in this case 70%
.
Simplified to remove the if stuff, percentage based damage only.
Code:
int v5;
double PDDMultsqrt;
double v11;
PDDMultsqrt = sqrt(PDDMult); // 70.71
v5 = (a5 * PDDMultsqrt) / 100 + PDDMultsqrt; // a5 is some other defensive buff, I don't know what. Anyway, if it's 0, this will be v5=70
(if moblevel > charlevel there's additional work here to reduce the value in v5)
v11 = (100 - v5) * mob_base_damage * 0.01; // 30 * mob damage * 0.01
return v11;v5 is effectively truncating the percentage to a whole number (in this case 70%
.

