From 41a8ed4cc1bb01557da80f025014743379e0dd36 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 28 Jul 2014 22:33:33 -0700 Subject: [PATCH] pk2pk 4->5 level errata 4th gen stuff now have their met level set to current level --- pk2pk.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pk2pk.cs b/pk2pk.cs index bdd910d46..63063e27d 100644 --- a/pk2pk.cs +++ b/pk2pk.cs @@ -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