From 7404a65c15b1bb28cae680a96da24afa25bcd6cb Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 10 Dec 2016 22:57:31 -0800 Subject: [PATCH] Add PBR save count identification via Tux at https://projectpokemon.org/forums/forums/topic/36582-pok%C3%A9mon-battle-revolution-save-research-thread/ Closes #317 --- PKHeX/Saves/SAV4BR.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PKHeX/Saves/SAV4BR.cs b/PKHeX/Saves/SAV4BR.cs index 2d9f3bfcf..dc0b2decd 100644 --- a/PKHeX/Saves/SAV4BR.cs +++ b/PKHeX/Saves/SAV4BR.cs @@ -24,6 +24,7 @@ public SAV4BR(byte[] data = null) Data = DecryptPBRSaveData(data); // Detect active save + SaveCount = Math.Max(BigEndian.ToUInt32(Data, 0x1C004C), BigEndian.ToUInt32(Data, 0x4C)); if (BigEndian.ToUInt32(Data, 0x1C004C) > BigEndian.ToUInt32(Data, 0x4C)) { byte[] tempData = new byte[0x1C0000]; @@ -52,7 +53,7 @@ public SAV4BR(byte[] data = null) resetBoxes(); } - private readonly int SaveCount; // TODO : unique save identification + private readonly uint SaveCount; public override byte[] Write(bool DSV) { setChecksums();