mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-07 23:08:47 -05:00
Make PCBinary a method instead of get prop
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user