Xeevis
Sorceror
This bug existed in RunUO as far as I remember not sure why noone repaired it yet even when its so obvious. Basically when player clicks on city vendor he can get trained in some skills. Normally when he's above possible training value this context entry is grayed out.
Problem is, even when he pays for full training there's still fat chance that this entry will remain white till player trains that skill for at least +0.1 ... this is caused by wrong double value in BaseCreature.cs. When dividing NPC skillbase by 3.0 it will yield result with many decimal places like 27.13526272 which is then compared to player skill 27.1 ... In game terms these two skill values are equal so no training can occur, but in math terms the first one is actually higher. So context still thinks that NPC can teach player in this particular skill, but he can't. I suggest that everyone applies this fix as it does get annoying to players (especially on no-skillcap shards).
Just change
into
And from this point if context entry is white player can train, if its gray he can't, period.
Problem is, even when he pays for full training there's still fat chance that this entry will remain white till player trains that skill for at least +0.1 ... this is caused by wrong double value in BaseCreature.cs. When dividing NPC skillbase by 3.0 it will yield result with many decimal places like 27.13526272 which is then compared to player skill 27.1 ... In game terms these two skill values are equal so no training can occur, but in math terms the first one is actually higher. So context still thinks that NPC can teach player in this particular skill, but he can't. I suggest that everyone applies this fix as it does get annoying to players (especially on no-skillcap shards).
Just change
Code:
double toTeach = skill.Base / 3.0;
Code:
double toTeach = Math.Truncate(skill.Base / 3.0 * 10) / 10;
And from this point if context entry is white player can train, if its gray he can't, period.