mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-12 13:15:36 -05:00
Next seed if activation fails
ty santacrab for pointing this out
This commit is contained in:
@@ -22,7 +22,10 @@ public static void SetRandom<T>(this T enc, PK3 pk, PersonalInfo3 pi, EncounterC
|
||||
{
|
||||
var check = new LeadSeed(seed, LeadRequired.None);
|
||||
if (!MethodH.CheckEncounterActivation(enc, ref check))
|
||||
{
|
||||
seed = LCRNG.Next(seed);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
var esv = LCRNG.Next16(ref seed) % 100;
|
||||
if (esv < min || esv > max)
|
||||
|
||||
@@ -32,7 +32,10 @@ public static uint SetRandomJ<T>(this T enc, PK4 pk, PersonalInfo4 pi, Encounter
|
||||
{
|
||||
var check = new LeadSeed(seed, LeadRequired.None);
|
||||
if (!MethodJ.CheckEncounterActivation(enc, ref check))
|
||||
{
|
||||
seed = LCRNG.Next(seed);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
var esv = LCRNG.Next16(ref seed) / 656;
|
||||
if (esv < min || esv > max)
|
||||
|
||||
@@ -33,7 +33,10 @@ public static uint SetRandomK<T>(this T enc, PK4 pk, PersonalInfo4 pi, Encounter
|
||||
{
|
||||
var check = new LeadSeed(seed, LeadRequired.None);
|
||||
if (!MethodK.CheckEncounterActivation(enc, ref check))
|
||||
{
|
||||
seed = LCRNG.Next(seed);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
var esv = LCRNG.Next16(ref seed) % modulo;
|
||||
if (esv < min || esv > max)
|
||||
|
||||
Reference in New Issue
Block a user