mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Don't add new gs moves to pk1 permit array
Out of range https://projectpokemon.org/home/forums/topic/62190-user-message-an-unhandled-exception-has-occurred-you-can-continue-running-pkhex-but-please-report-this-error
This commit is contained in:
parent
88ac14946d
commit
125d18e2be
1 changed files with 6 additions and 2 deletions
|
@ -73,9 +73,9 @@ public sealed class LearnSource2GS : ILearnSource, IEggSource
|
|||
if (!TryGetPersonal(evo.Species, evo.Form, out var pi))
|
||||
return;
|
||||
|
||||
bool removeVC = pk.Format == 1 || pk.VC1;
|
||||
if (types.HasFlagFast(MoveSourceType.LevelUp))
|
||||
{
|
||||
bool removeVC = pk.Format == 1 || pk.VC1;
|
||||
var learn = GetLearnset(evo.Species, evo.Form);
|
||||
var min = ParseSettings.AllowGen2MoveReminder(pk) ? 1 : evo.LevelMin;
|
||||
(bool hasMoves, int start, int end) = learn.GetMoveRange(evo.LevelMax, min);
|
||||
|
@ -98,7 +98,11 @@ public sealed class LearnSource2GS : ILearnSource, IEggSource
|
|||
for (int i = 0; i < moves.Length; i++)
|
||||
{
|
||||
if (flags[i])
|
||||
result[moves[i]] = true;
|
||||
{
|
||||
var move = moves[i];
|
||||
if (!removeVC || move < Legal.MaxMoveID_1)
|
||||
result[move] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue