Fix Static/Gift IV method call (#2310)

This commit is contained in:
Matt 2019-05-15 15:07:48 -04:00 committed by Kurt
parent b7f024e3ea
commit 25985f11e6
6 changed files with 4 additions and 4 deletions

View file

@ -902,7 +902,7 @@ namespace PKHeX.Core
} }
} }
public static bool GetIsFixedIVSequenceValid(IReadOnlyList<int> IVs, PKM pkm, int max = 31) public static bool GetIsFixedIVSequenceValidSkipRand(IReadOnlyList<int> IVs, PKM pkm, int max = 31)
{ {
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
{ {

View file

@ -345,7 +345,7 @@ namespace PKHeX.Core
if (IVs != null && (Generation > 2 || pkm.Format <= 2)) // 1,2->7 regenerates IVs, only check if original IVs still exist if (IVs != null && (Generation > 2 || pkm.Format <= 2)) // 1,2->7 regenerates IVs, only check if original IVs still exist
{ {
if (!Legal.GetIsFixedIVSequenceValidNoRand(IVs, pkm)) if (!Legal.GetIsFixedIVSequenceValidSkipRand(IVs, pkm))
return false; return false;
} }

View file

@ -232,7 +232,7 @@ namespace PKHeX.Core
{ {
if (IVs != null) if (IVs != null)
{ {
if (!Legal.GetIsFixedIVSequenceValid(IVs, pkm)) if (!Legal.GetIsFixedIVSequenceValidSkipRand(IVs, pkm))
return false; return false;
} }

View file

@ -54,7 +54,7 @@ namespace PKHeX.Core
var ivflag = Array.Find(IVs, iv => (byte)(iv - 0xFC) < 3); var ivflag = Array.Find(IVs, iv => (byte)(iv - 0xFC) < 3);
if (ivflag == 0) // Random IVs if (ivflag == 0) // Random IVs
{ {
bool valid = Legal.GetIsFixedIVSequenceValid(IVs, data.pkm); bool valid = Legal.GetIsFixedIVSequenceValidSkipRand(IVs, data.pkm);
if (!valid) if (!valid)
data.AddLine(GetInvalid(LEncGiftIVMismatch)); data.AddLine(GetInvalid(LEncGiftIVMismatch));
} }