pk2pk 4->5 level errata

4th gen stuff now have their met level set to current level
This commit is contained in:
Kurt
2014-07-28 22:33:33 -07:00
parent 3bf2516851
commit 41a8ed4cc1

View File

@@ -412,6 +412,11 @@ public byte[] convertPK4toPK5(byte[] pk4)
// Reset Friendship
pk5[0x14] = (byte)getBaseFriendship(species);
// Fix Level
pk5[0x84] &= 0x80;
uint exp = BitConverter.ToUInt32(pk5, 0x10);
pk5[0x84] |= (byte)getLevel(species, exp);
// Fix Checksum
ushort chk = 0;
for (int i = 8; i < 136; i += 2) // Loop through the entire PKX