Well since no one responded with any actual data that might help determine possible client vs. server discrepancies, I did some experimenting myself to come up with some raw data.
I created a test character, human necro with default stat distributions.
I created 3 test items, each granting +AC, -Str, +Cha, +HP, and +Mana. Item 1 granted +/- 100 to all, item 2 granted +/- 35 to all, and item 3 granted +/- 50 to all. All three items were given a required level of 0 and a recommended level of 100.
I then tested the character's adjusted stats as reported by the client at levels 1-10, even levels 12-20, and levels 30, 33, 50, and 67. I did this test with the character wearing only item 1, only item 2, only item 3, and items 2 and 3 together.
The results were interesting, but inconsistent. Following are my conclusions based on the raw data I received...
1 - It is clear from the data that the client does use fully directly proportional linear scaling for stat scaling when the character level is below the recommended level.
2 - It is clear that the client uses something close/similar to standard rounding method, but not precisely so, any value resulting in exactly X.5 *may* round up, or may round down, but does not round to nearest even integer so is not "banker's rounding". Values greater than X.5 seem to always round up, and values less than X.5 seem to always round down. It is *not* clear as to why X.5 values do not always round up or to even, nor is it clear what the client is actually doing to decide which direction to round. It is clear, however, that the client does not use Floor, Ceiling, Banker's, or Truncation methods.
3 - It is clear that negative stat bonuses do *not* scale, but take full effect regardless of character level.
4 - It is clear that the minimum integer value for a scaled positive stat bonus is 1.
5 - It is clear that item bonuses are calculated and rounded individually, and then the integer values are added together. That is, the bonuses from a single item are calculated for scaling and rounding using the client's usual rounding method to determine an integer value from that individual item. All items are treated individually in this way. Then the calculated integer values from all items are added together to get the total stat bonus that the client will display.
6 - It is clear that the client displays additional bonus AC beyond what is expected from the items, even at full recommended level with no stat scaling in effect, and identical Agi rating for all levels tested. This bonus varies somewhat, appears to be approximately +57% to +64% combined total, but it is not granted at every available level.
So, based on all of that, the calculation used for the "Client::CalcRecommendedLevelBonus" function is as correct as it can be with two exceptions: first, that it tries to scale negative values, and second, that it does not maintain a minimum positive value of 1. So I'm still not sure why there is a discrepancy between the server values and the client-side values for HP, but it's making the client show less than full HP and refusing to regen to full.
I'll play with the code some and see if I can't get it to at least try and properly regen to full.
Later,
Drake Phoenix
|