diff --git a/PKHeX/Subforms/Save Editors/Gen5/SAV_CGearSkin.cs b/PKHeX/Subforms/Save Editors/Gen5/SAV_CGearSkin.cs index 5128b4349..9def44b34 100644 --- a/PKHeX/Subforms/Save Editors/Gen5/SAV_CGearSkin.cs +++ b/PKHeX/Subforms/Save Editors/Gen5/SAV_CGearSkin.cs @@ -46,7 +46,7 @@ private void B_ImportPNG_Click(object sender, EventArgs e) } catch (Exception ex) { - Util.Error("An unexpected error has occurred.", ex); + Util.Error(ex.Message); } } private void B_ExportPNG_Click(object sender, EventArgs e) @@ -109,6 +109,8 @@ private void B_Save_Click(object sender, EventArgs e) if (bgdata.SequenceEqual(new byte[CGearBackground.SIZE_CGB])) return; + // Data present + bgdata = CGearBackground.CGBtoPSK(bgdata, SAV.B2W2); Array.Copy(bgdata, 0, Main.SAV.Data, SAV.CGearDataOffset, bgdata.Length); @@ -120,6 +122,11 @@ private void B_Save_Click(object sender, EventArgs e) ushort skinchkval = SaveUtil.ccitt16(skinchkdata); BitConverter.GetBytes(skinchkval).CopyTo(Main.SAV.Data, SAV.CGearDataOffset + bgdata.Length + 0x112); + // Indicate in the save file that data is present + BitConverter.GetBytes((ushort)0xC21E).CopyTo(Main.SAV.Data, 0x19438); + + + Main.SAV.Data[SAV.CGearInfoOffset + 0x26] = 1; // data present BitConverter.GetBytes(chk).CopyTo(Main.SAV.Data, SAV.CGearInfoOffset + 0x24);