mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-07 14:57:19 -05:00
Add temp hotfix for broken swsh saves
This commit is contained in:
parent
848737b2a0
commit
f0dfaa2e50
|
|
@ -717,7 +717,19 @@ private static void StoreLegalSaveGameData(SaveFile sav)
|
|||
private bool OpenSAV(SaveFile sav, string path)
|
||||
{
|
||||
if (sav == null || sav.Version == GameVersion.Invalid)
|
||||
{ WinFormsUtil.Error(MsgFileLoadSaveLoadFail, path); return true; }
|
||||
{
|
||||
if (sav is SAV8SWSH z)
|
||||
{
|
||||
var shift = z.Game + (GameVersion.SW - GameVersion.SN);
|
||||
if (shift == (int) GameVersion.SW || shift == (int) GameVersion.SH)
|
||||
z.Game = shift;
|
||||
}
|
||||
else
|
||||
{
|
||||
WinFormsUtil.Error(MsgFileLoadSaveLoadFail, path);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
sav.SetFileInfo(path);
|
||||
if (!SanityCheckSAV(ref sav))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user