Reorder 6->7 logic

Geolocation data cleared when converting 6->7
this tradebank/georegion apply happens first but don't modify the pk6.
all that matters is that we do this before the clearing
This commit is contained in:
Kurt 2017-02-07 16:10:14 -08:00
parent c205eef22e
commit 9897599420

View file

@ -619,6 +619,10 @@ namespace PKHeX.Core
break;
}
pk7.TradeMemory(Bank: true); // oh no, memories on gen7 pkm
pk7.Geo1_Country = PKMConverter.Country;
pk7.Geo1_Region = PKMConverter.Region;
// Bank-accurate data zeroing
for (var i = 0x94; i < 0x9E; i++) pk7.Data[i] = 0; /* Geolocations. */
for (var i = 0xAA; i < 0xB0; i++) pk7.Data[i] = 0; /* Unused/Amie Fullness & Enjoyment. */
@ -626,10 +630,6 @@ namespace PKHeX.Core
pk7.Data[0x72] &= 0xFC; /* Clear lower two bits of Super training flags. */
pk7.Data[0xDE] = 0; /* Gen IV encounter type. */
pk7.TradeMemory(Bank: true); // oh no, memories on gen7 pkm
pk7.Geo1_Country = PKMConverter.Country;
pk7.Geo1_Region = PKMConverter.Region;
// Fix Checksum
pk7.RefreshChecksum();