Make PCBinary a method instead of get prop

This commit is contained in:
Kurt
2019-10-03 17:45:19 -07:00
parent c0cdf81ca5
commit 39eedb1db2
3 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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; }