Misc tweaks

detect antishiny cxd
remove unused using
don't set caught for seenAll (gen7 dex)
This commit is contained in:
Kurt 2017-12-04 13:18:24 -08:00
parent f030161fd6
commit a5dbdf91bd
3 changed files with 11 additions and 4 deletions

View File

@ -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;

View File

@ -1,5 +1,4 @@
using System;
using System;
namespace PKHeX.Core
{

View File

@ -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);
}
}
}