From 39eedb1db25c969bed11e1a73cf36e7e6731fec7 Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 3 Oct 2019 17:45:19 -0700 Subject: [PATCH] Make PCBinary a method instead of get prop --- PKHeX.Core/Saves/SaveFile.cs | 2 +- PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs | 2 +- PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PKHeX.Core/Saves/SaveFile.cs b/PKHeX.Core/Saves/SaveFile.cs index f2b37efae..83414ccbb 100644 --- a/PKHeX.Core/Saves/SaveFile.cs +++ b/PKHeX.Core/Saves/SaveFile.cs @@ -890,7 +890,7 @@ public virtual void SetBoxWallpaper(int box, int value) #endregion #region Box Binaries - public byte[] PCBinary => BoxData.SelectMany(pk => pk.EncryptedBoxData).ToArray(); + public byte[] GetPCBinary() => BoxData.SelectMany(pk => pk.EncryptedBoxData).ToArray(); public byte[] GetBoxBinary(int box) => GetBoxData(box).SelectMany(pk => pk.EncryptedBoxData).ToArray(); public bool SetPCBinary(byte[] data) diff --git a/PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs b/PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs index 49e9e5630..8ba6e97b3 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs @@ -196,7 +196,7 @@ public bool SaveBoxBinary() var sfd = new SaveFileDialog { Filter = "Box Data|*.bin", FileName = "pcdata.bin" }; if (sfd.ShowDialog() != DialogResult.OK) return false; - File.WriteAllBytes(sfd.FileName, SAV.PCBinary); + File.WriteAllBytes(sfd.FileName, SAV.GetPCBinary()); return true; } if (dr == DialogResult.No) diff --git a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs index 73679a5aa..c25ddf000 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs @@ -756,7 +756,7 @@ public bool ExportBackup() public bool OpenPCBoxBin(byte[] input, out string c) { - if (SAV.PCBinary.Length == input.Length) + if (SAV.GetPCBinary().Length == input.Length) { if (SAV.IsAnySlotLockedInBox(0, SAV.BoxCount - 1)) { c = MsgSaveBoxImportPCFailBattle; return false; }