 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
| Author |
Message |
OldnGrey
Joined: 04 Feb 2006 Posts: 517
|
Posted: Tue Jan 15, 2008 4:31 am Post subject: |
|
|
I see Austin has done a nice fix for the titles.
Now here's another one.
The core double-precision bug is still there and it makes a difference in the 4 Attributes functions that set stats/skills. As the functions currently exist, try setting a skill or stat to 0.8 and you will get 0.7.
AP_SetTrueSkill
AP_SetSkillMod
AP_SetTrueStat
AP_SetStatMod
Although the advancecheck.inc file deals with the bug internally (CheckStatsForSkill and CheckSkillAdvance), these aren't the only scripts that set the value of an attribute using one of the above scripts.
I'd suggest doing the mods in the 4 functions above, then any script can set a skill or stat value safely.
For example change AP_SetStatMod to read:
| Code: | function AP_SetTrueStat(mobile, attributeid, points)
if ( points >= 0 )
SetAttributeBaseValue(mobile, attributeid, CInt(CDbl(points) * 10.0 + 0.1));
else
SetAttributeBaseValue(mobile, attributeid, CInt(CDbl(points) * 10.0 - 0.1));
endif
RecalcVitals(mobile);
endfunction |
|
|
 |
|
|
 |
 |
|