Clamp level range to slot for 3/4=>5+ transfers

This commit is contained in:
Kurt
2024-07-22 16:09:37 -05:00
parent ea4ff5714c
commit bf1dcf0737

View File

@@ -146,7 +146,7 @@ public static EvoCriteria GetLevelConstraint<TEnc>(PKM pk, ReadOnlySpan<EvoCrite
foreach (var evo in chain)
{
if (evo.Species == enc.Species)
return evo;
return evo with { LevelMin = Math.Max(evo.LevelMin, enc.LevelMin), LevelMax = Math.Min(evo.LevelMax, enc.LevelMax) };
}
throw new ArgumentException("No matching species found in the evolution chain.");
}