You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few issues with crafting stacks of items. Most seriously, it's trivial to e.g. train cooking to GM by starting from < 10.0 skill and making 1000 fish steaks.
In the following code from SkillCheck.cs, the skill.Base < 10.0 check (for automatic gains) is done against skill.Base, which is not updated in the loop. Only gains and value are updated. Crafting 1000 items from skill 0 will give an automatic gain for each iteration.
for (int i = 0; i < amount; i++)
{
double gc = GetGainChance(from, skill, (value - minSkill) / (maxSkill - minSkill), value) / 10;
if (AllowGain(from, skill, new Point2D(from.Location.X / LocationSize, from.Location.Y / LocationSize)))
{
if (from.Alive && (skill.Base < 10.0 || Utility.RandomDouble() <= gc || CheckGGS(from, skill)))
{
gains++;
value += 0.1;
}
}
}
The text was updated successfully, but these errors were encountered:
Related to that, the GetGainChance call is also very suspect.
The actual method signature looks like this: private static double GetGainChance(Mobile from, Skill skill, double gains, double chance), with gains and chance expected as the last two parameters.
However, it is called with (value - minSkill) / (maxSkill - minSkill) and value as the last two parameters (basically "chance" and "the current skill value", respectively).
In addition, the actual implementation doesn't even use the chance method parameter.
I see what you are saying. Thank you for bringing this to my attention. Also, I've noticed CheckGGS will bypass any checks (if its time for a ggs gain).
There are a few issues with crafting stacks of items. Most seriously, it's trivial to e.g. train cooking to GM by starting from < 10.0 skill and making 1000 fish steaks.
In the following code from SkillCheck.cs, the
skill.Base < 10.0
check (for automatic gains) is done againstskill.Base
, which is not updated in the loop. Onlygains
andvalue
are updated. Crafting 1000 items from skill 0 will give an automatic gain for each iteration.The text was updated successfully, but these errors were encountered: