Fix loading past gen formats

Mainly from database viewer, also skip annoying MessageBox if loaded
from Database.
This commit is contained in:
Kaphotics 2016-07-23 14:16:23 -07:00
parent 419ed553cb
commit 2443ace5f8

View file

@ -1062,7 +1062,7 @@ namespace PKHeX
{
if (pk == null) { Util.Error("Attempted to load a null file."); return; }
if (pk.Format != SAV.Generation)
if (pk.Format > SAV.Generation)
{ Util.Alert("Can't load future generation files."); return; }
bool oldInit = fieldsInitialized;
@ -1079,7 +1079,7 @@ namespace PKHeX
{
string c;
pkm = PKMConverter.convertToFormat(pkm, SAV.Generation, out c);
if (pk.Format != pkm.Format) // converted
if (pk.Format != pkm.Format && focus) // converted
Util.Alert("Converted File.");
}