mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add alternate clone hash method for Semi clones
https://projectpokemon.org/home/forums/topic/47048-suggestion-being-able-to-check-pokemon-with-exact-pid-semi-clones/ hold control when searching (kinda clunky solution) to instead search by PID clones
This commit is contained in:
parent
e366f9a93d
commit
10894f5341
1 changed files with 16 additions and 1 deletions
|
@ -123,6 +123,16 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
}
|
||||
|
||||
private static string PIDHash(PKM pk)
|
||||
{
|
||||
switch (pk.Format)
|
||||
{
|
||||
case 1: return $"{((PK1)pk).DV16:X4}";
|
||||
case 2: return $"{((PK2)pk).DV16:X4}";
|
||||
default: return $"{pk.PID:X8}";
|
||||
}
|
||||
}
|
||||
|
||||
// Important Events
|
||||
private void ClickView(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -519,7 +529,12 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
|
||||
if (Menu_SearchClones.Checked)
|
||||
res = res.GroupBy(Hash).Where(group => group.Count() > 1).SelectMany(z => z);
|
||||
{
|
||||
Func<PKM, string> method = Hash;
|
||||
if (ModifierKeys == Keys.Control)
|
||||
method = PIDHash;
|
||||
res = res.GroupBy(method).Where(group => group.Count() > 1).SelectMany(z => z);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue