From bfcb5a9ed2d6d732dbfd447d19e23096f4f44f74 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 9 Dec 2016 11:38:32 +0000 Subject: [PATCH] Fix issues with personal editor --- pk3DS/Main.cs | 2 ++ pk3DS/Structures/PersonalInfo/PersonalInfoXY.cs | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pk3DS/Main.cs b/pk3DS/Main.cs index f879df7..584fc6d 100644 --- a/pk3DS/Main.cs +++ b/pk3DS/Main.cs @@ -479,6 +479,8 @@ private void B_Personal_Click(object sender, EventArgs e) // Set Master Table back for (int i = 0; i < d.Length - 1; i++) d[i].CopyTo(d[d.Length-1], i * d[i].Length); + + Config.GARCPersonal.Files = d; Config.GARCPersonal.Save(); Config.InitializePersonal(); diff --git a/pk3DS/Structures/PersonalInfo/PersonalInfoXY.cs b/pk3DS/Structures/PersonalInfo/PersonalInfoXY.cs index e119207..b6658da 100644 --- a/pk3DS/Structures/PersonalInfo/PersonalInfoXY.cs +++ b/pk3DS/Structures/PersonalInfo/PersonalInfoXY.cs @@ -57,8 +57,8 @@ public override int[] Items { if (value?.Length != 3) return; BitConverter.GetBytes((short)value[0]).CopyTo(Data, 0xC); - BitConverter.GetBytes((short)value[0]).CopyTo(Data, 0xE); - BitConverter.GetBytes((short)value[0]).CopyTo(Data, 0x10); + BitConverter.GetBytes((short)value[1]).CopyTo(Data, 0xE); + BitConverter.GetBytes((short)value[2]).CopyTo(Data, 0x10); } } public override int Gender { get { return Data[0x12]; } set { Data[0x12] = (byte)value; } } @@ -80,7 +80,7 @@ public override int[] Abilities get { return new int[] { Data[0x18], Data[0x19], Data[0x1A] }; } set { - if (value?.Length != 2) return; + if (value?.Length != 3) return; Data[0x18] = (byte)value[0]; Data[0x19] = (byte)value[1]; Data[0x1A] = (byte)value[2];