From a5dbdf91bd13bfaeb8e66f9bc7bc8743b047e4fc Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 4 Dec 2017 13:18:24 -0800 Subject: [PATCH] Misc tweaks detect antishiny cxd remove unused using don't set caught for seenAll (gen7 dex) --- PKHeX.Core/Legality/RNG/MethodFinder.cs | 8 +++++++- PKHeX.Core/Saves/Substructures/Mail/Mail5.cs | 1 - .../Subforms/Save Editors/Gen7/SAV_PokedexSM.cs | 6 ++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Legality/RNG/MethodFinder.cs b/PKHeX.Core/Legality/RNG/MethodFinder.cs index daa95676f..4074f9e81 100644 --- a/PKHeX.Core/Legality/RNG/MethodFinder.cs +++ b/PKHeX.Core/Legality/RNG/MethodFinder.cs @@ -204,7 +204,13 @@ private static bool GetXDRNGMatch(uint top, uint bot, uint[] IVs, out PIDIV pidi var A = RNG.XDRNG.Prev(B); if (!GetIVs(A >> 16, B >> 16).SequenceEqual(IVs)) - continue; + { + // check for antishiny (once), unroll 2x + B = RNG.XDRNG.Prev(A); + A = RNG.XDRNG.Prev(B); + if (!GetIVs(A >> 16, B >> 16).SequenceEqual(IVs)) + continue; + } pidiv = new PIDIV {OriginSeed = RNG.XDRNG.Prev(A), RNG = RNG.XDRNG, Type = PIDType.CXD}; return true; diff --git a/PKHeX.Core/Saves/Substructures/Mail/Mail5.cs b/PKHeX.Core/Saves/Substructures/Mail/Mail5.cs index 8d241f376..27a1dfd76 100644 --- a/PKHeX.Core/Saves/Substructures/Mail/Mail5.cs +++ b/PKHeX.Core/Saves/Substructures/Mail/Mail5.cs @@ -1,5 +1,4 @@ using System; -using System; namespace PKHeX.Core { diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs index c94490460..a888a5cd8 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs @@ -419,7 +419,8 @@ private void SetAll(object sender, bool USUM, int lang) // Set base species flags LB_Species.SelectedIndex = i; SetSeen(sender, gt, false); - SetCaught(sender, gt, lang, false); + if (sender != mnuSeenAll) + SetCaught(sender, gt, lang, false); // Set forme flags var entries = GetAllFormEntries(spec, USUM).Where(z => z >= SAV.MaxSpeciesID).Distinct(); @@ -427,7 +428,8 @@ private void SetAll(object sender, bool USUM, int lang) { LB_Species.SelectedIndex = f; SetSeen(sender, gt, true); - SetCaught(sender, gt, lang, true); + if (sender != mnuSeenAll) + SetCaught(sender, gt, lang, true); } } }