Enhance clone detection for gen1/2

Would only return unique species as PID is not used, use IV values as
unique identification.
This commit is contained in:
Kurt 2017-01-14 12:10:42 -08:00
parent f0b5adcfe3
commit c075ff3c47

View file

@ -120,7 +120,15 @@ namespace PKHeX.WinForms
private readonly string Counter; private readonly string Counter;
private readonly string Viewed; private readonly string Viewed;
private const int MAXFORMAT = 7; private const int MAXFORMAT = 7;
private readonly Func<PKM, string> hash = pk => pk.Species.ToString("000") + pk.PID.ToString("X8"); private readonly Func<PKM, string> hash = pk =>
{
switch (pk.Format)
{
case 1: return ((PK1)pk).DV16.ToString("X4");
case 2: return ((PK2)pk).DV16.ToString("X4");
default: return pk.Species.ToString("000") + pk.PID.ToString("X8");
}
};
// Important Events // Important Events
private void clickView(object sender, EventArgs e) private void clickView(object sender, EventArgs e)