mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-09 13:16:59 -05:00
Fix shiny/nonshiny egg mysterygift link trade checks
thanks @Admiral-Fish for finding this case
This commit is contained in:
@@ -2314,7 +2314,7 @@ private void VerifyFatefulMysteryGift(MysteryGift g)
|
||||
if (g is PGF p && p.IsShiny)
|
||||
{
|
||||
Info.PIDIV = MethodFinder.Analyze(pkm);
|
||||
if (Info.PIDIV.Type != PIDType.G5MGShiny)
|
||||
if (Info.PIDIV.Type != PIDType.G5MGShiny && pkm.Egg_Location != 30003)
|
||||
AddLine(Severity.Invalid, V411, CheckIdentifier.PID);
|
||||
}
|
||||
|
||||
|
||||
@@ -1316,8 +1316,13 @@ private static bool GetIsMatchPGF(PKM pkm, PGF wc, IEnumerable<DexLevel> vs)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wc.EggLocation != pkm.Egg_Location && pkm.Egg_Location != 30003) // traded
|
||||
return false;
|
||||
if (wc.EggLocation != pkm.Egg_Location) // traded
|
||||
{
|
||||
if (pkm.Egg_Location != 30003)
|
||||
return false;
|
||||
}
|
||||
else if (wc.PIDType == 0 && pkm.IsShiny)
|
||||
return false; // can't be traded away for unshiny
|
||||
if (pkm.IsEgg && !pkm.IsNative)
|
||||
return false;
|
||||
}
|
||||
@@ -1357,8 +1362,13 @@ private static bool GetIsMatchWC6(PKM pkm, WC6 wc, IEnumerable<DexLevel> vs)
|
||||
|
||||
if (wc.IsEgg)
|
||||
{
|
||||
if (wc.EggLocation != pkm.Egg_Location && pkm.Egg_Location != 30002) // traded
|
||||
return false;
|
||||
if (wc.EggLocation != pkm.Egg_Location) // traded
|
||||
{
|
||||
if (pkm.Egg_Location != 30002)
|
||||
return false;
|
||||
}
|
||||
else if (wc.PIDType == 0 && pkm.IsShiny)
|
||||
return false; // can't be traded away for unshiny
|
||||
if (pkm.IsEgg && !pkm.IsNative)
|
||||
return false;
|
||||
}
|
||||
@@ -1410,8 +1420,13 @@ private static bool GetIsMatchWC7(PKM pkm, WC7 wc, IEnumerable<DexLevel> vs)
|
||||
|
||||
if (wc.IsEgg)
|
||||
{
|
||||
if (wc.EggLocation != pkm.Egg_Location && pkm.Egg_Location != 30002) // traded
|
||||
return false;
|
||||
if (wc.EggLocation != pkm.Egg_Location) // traded
|
||||
{
|
||||
if (pkm.Egg_Location != 30002)
|
||||
return false;
|
||||
}
|
||||
else if (wc.PIDType == 0 && pkm.IsShiny)
|
||||
return false; // can't be traded away for unshiny
|
||||
if (pkm.IsEgg && !pkm.IsNative)
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user