mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 01:19:29 -05:00
misc fixes
encounterinvalid isegg no longer throws exceptions when parsing moves dropping invalid file paths to main window are now ignored (downloads from chrome can be manually deleted but still dragged from the downloads bar) add pidiv case for manaphy gift
This commit is contained in:
@@ -128,12 +128,12 @@ private static CheckResult[] parseMoves3DS(PKM pkm, GameVersion game, int[] Move
|
||||
}
|
||||
private static CheckResult[] parseMovesPre3DS(PKM pkm, int[] Moves, LegalInfo info)
|
||||
{
|
||||
if (pkm.IsEgg)
|
||||
if (pkm.IsEgg && info.EncounterMatch is EncounterEgg egg)
|
||||
{
|
||||
int[] SpecialMoves = (info.EncounterMatch as IMoveset)?.Moves;
|
||||
// Gift do not have special moves but also should not have normal egg moves
|
||||
var allowinherited = SpecialMoves == null && !pkm.WasGiftEgg && pkm.Species != 489 && pkm.Species != 490;
|
||||
return parseMovesIsEggPreRelearn(pkm, Moves, SpecialMoves ?? new int[0], allowinherited, info.EncounterMatch as EncounterEgg);
|
||||
return parseMovesIsEggPreRelearn(pkm, Moves, SpecialMoves ?? new int[0], allowinherited, egg);
|
||||
}
|
||||
if (pkm.GenNumber <= 2 && (info.EncounterMatch as IGeneration)?.Generation == 1)
|
||||
return parseMovesGen1(pkm, Moves, info);
|
||||
|
||||
@@ -542,6 +542,8 @@ public static bool IsCompatible4(this PIDType val, IEncounterable encounter)
|
||||
return s.Shiny == true ? val == PIDType.ChainShiny : val == PIDType.Method_1;
|
||||
case EncounterSlot _:
|
||||
return val == PIDType.Method_1;
|
||||
case PGT g: // manaphy
|
||||
return val == PIDType.Method_1 || val == PIDType.None; // regular && antishiny
|
||||
default:
|
||||
return val == PIDType.None;
|
||||
}
|
||||
|
||||
@@ -460,6 +460,8 @@ private void OpenQuick(string path, bool force = false)
|
||||
|
||||
string ext = Path.GetExtension(path);
|
||||
FileInfo fi = new FileInfo(path);
|
||||
if (!fi.Exists)
|
||||
return;
|
||||
if (fi.Length > 0x10009C && fi.Length != 0x380000 && ! SAV3GCMemoryCard.IsMemoryCardSize(fi.Length))
|
||||
WinFormsUtil.Error("Input file is too large." + Environment.NewLine + $"Size: {fi.Length} bytes", path);
|
||||
else if (fi.Length < 32)
|
||||
|
||||
Reference in New Issue
Block a user