mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 22:54:14 +00:00
Check EC-PID same for gen1/2 transfers
Fix PID->EC on gen<3 transfers https://projectpokemon.org/home/forums/topic/43779-about-vc-pokemons-pid-and-encryptionconstant/
This commit is contained in:
parent
d6fbd0f0d7
commit
033d5baa06
3 changed files with 7 additions and 5 deletions
|
@ -101,7 +101,7 @@ namespace PKHeX.Core
|
|||
if (pkm.PID == 0)
|
||||
AddLine(Severity.Fishy, V207, CheckIdentifier.PID);
|
||||
|
||||
if (Info.Generation >= 6 && pkm.PID == pkm.EncryptionConstant)
|
||||
if ((Info.Generation >= 6 || Info.Generation < 3 && pkm.Format >= 7) && pkm.PID == pkm.EncryptionConstant)
|
||||
AddLine(Severity.Invalid, V208, CheckIdentifier.PID); // better to flag than 1:2^32 odds since RNG is not feasible to yield match
|
||||
|
||||
switch (EncounterMatch)
|
||||
|
|
|
@ -818,7 +818,7 @@ namespace PKHeX.Core
|
|||
SetShinyIVs();
|
||||
|
||||
do PID = PKX.GetRandomPID(Species, Gender, Version, Nature, AltForm, PID); while (!IsShiny);
|
||||
if (GenNumber < 6)
|
||||
if (Format >= 6 && 3 <= GenNumber && GenNumber <= 5)
|
||||
EncryptionConstant = PID;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -839,7 +839,7 @@ namespace PKHeX.Core
|
|||
public void SetPIDGender(int gender)
|
||||
{
|
||||
do PID = PKX.GetRandomPID(Species, gender, Version, Nature, AltForm, PID); while (IsShiny);
|
||||
if (GenNumber < 6)
|
||||
if (Format >= 6 && 3 <= GenNumber && GenNumber <= 5)
|
||||
EncryptionConstant = PID;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -851,7 +851,7 @@ namespace PKHeX.Core
|
|||
public void SetPIDNature(int nature)
|
||||
{
|
||||
do PID = PKX.GetRandomPID(Species, Gender, Version, nature, AltForm, PID); while (IsShiny);
|
||||
if (GenNumber < 6)
|
||||
if (Format >= 6 && 3 <= GenNumber && GenNumber <= 5)
|
||||
EncryptionConstant = PID;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -864,6 +864,8 @@ namespace PKHeX.Core
|
|||
public void SetPIDUnown3(int form)
|
||||
{
|
||||
do PID = Util.Rand32(); while (PKX.GetUnownForm(PID) != form);
|
||||
if (Format >= 6 && 3 <= GenNumber && GenNumber <= 5)
|
||||
EncryptionConstant = PID;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1043,7 +1043,7 @@ namespace PKHeX.WinForms.Controls
|
|||
TB_PID.Text = pkm.PID.ToString("X8");
|
||||
SetIsShiny(null);
|
||||
UpdateSprite();
|
||||
if (pkm.GenNumber < 6 && pkm.Format >= 6)
|
||||
if (pkm.Format >= 6 && 3 <= pkm.GenNumber && pkm.GenNumber <= 5)
|
||||
TB_EC.Text = TB_PID.Text;
|
||||
}
|
||||
private void UpdateRandomEC(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in a new issue