This function is used to calculate the stats of an item when the recomended level is greater then the character level.
Code:
int Client::CalcRecommendedLevelBonus(int8 level, uint8 reclevel, int basestat)
{
if( (reclevel > 0) && (level < reclevel) )
{
float statmod = (level / reclevel) * basestat;
if( statmod < 0 )
{
statmod *= -1;
statmod += 0.5;
return (((int)statmod) * -1);
}
else
{
statmod += 0.5;
return (int)statmod;
}
}
return 0;
}
In the above code
Code:
float statmod = (level / reclevel) * basestat; will always return 0.
The fix should be (please bear with me as I cannot compile or test the server yet. I need to set up the entire enviroment) ...
Code:
float statmod = (((float)level) / reclevel) * basestat;
There is a secondary issue (I beleive) that the server computes the stats on an item by item basis, while the client creates amalgamated items of the item and all its augs and then calculates the stats.
Chris