Correctly check xy/sm if not ao/usum levelup

This commit is contained in:
Kurt 2022-09-01 09:34:40 -07:00
parent 4a008e510d
commit e8aa2c8ed1
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ private static void CheckBoth(Span<MoveResult> result, ReadOnlySpan<ushort> curr
result[i] = new(chk, (byte)stage, Generation);
continue;
}
xy.GetCanLearn(pk, ao_pi, evo, move, types & MoveSourceType.LevelUp, option);
chk = xy.GetCanLearn(pk, ao_pi, evo, move, types & MoveSourceType.LevelUp, option);
if (chk != default)
result[i] = new(chk, (byte)stage, Generation);
}

View File

@ -138,7 +138,7 @@ private static void CheckBoth(Span<MoveResult> result, ReadOnlySpan<ushort> curr
if (evo.Species > Legal.MaxSpeciesID_7)
continue;
sm.GetCanLearn(pk, uu_pi, evo, move, types & MoveSourceType.LevelUp, option);
chk = sm.GetCanLearn(pk, uu_pi, evo, move, types & MoveSourceType.LevelUp, option);
if (chk != default)
result[i] = new(chk, (byte)stage, Generation);
}