From 19f49eb4a7ada28f33dda1d801d9e93a96af6179 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 9 Jan 2019 21:11:14 -0800 Subject: [PATCH] Misc update remove duplicate pb7 method (present in _K6); note that the fixed length should not be changed to SIZE_STORED comment out useless assignment --- PKHeX.Core/Legality/Areas/EncounterArea.cs | 4 ++-- PKHeX.Core/PKM/PB7.cs | 8 -------- PKHeX.Core/PKM/Shared/_K6.cs | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/PKHeX.Core/Legality/Areas/EncounterArea.cs b/PKHeX.Core/Legality/Areas/EncounterArea.cs index bd4d07fd0..897b760ff 100644 --- a/PKHeX.Core/Legality/Areas/EncounterArea.cs +++ b/PKHeX.Core/Legality/Areas/EncounterArea.cs @@ -242,7 +242,7 @@ private static IEnumerable GetAreas2_H(byte[] data, ref int ofs) head.Add(new EncounterArea { Location = (data[ofs++] << 8) | data[ofs++], - Slots = null, // later + //Slots = null, // later }); headID.Add(data[ofs++]); } @@ -255,7 +255,7 @@ private static IEnumerable GetAreas2_H(byte[] data, ref int ofs) rock.Add(new EncounterArea { Location = (data[ofs++] << 8) | data[ofs++], - Slots = null, // later + //Slots = null, // later }); rockID.Add(data[ofs++]); } diff --git a/PKHeX.Core/PKM/PB7.cs b/PKHeX.Core/PKM/PB7.cs index 3a670bd3a..61a8fcf67 100644 --- a/PKHeX.Core/PKM/PB7.cs +++ b/PKHeX.Core/PKM/PB7.cs @@ -42,14 +42,6 @@ public PB7(byte[] decryptedData, string ident = null) private string GetString(int Offset, int Count) => StringConverter.GetString7(Data, Offset, Count); private byte[] SetString(string value, int maxLength, bool chinese = false) => StringConverter.SetString7b(value, maxLength, Language, chinese: chinese); - protected override ushort CalculateChecksum() - { - ushort chk = 0; - for (int i = 8; i < 0xE8; i += 2) - chk += BitConverter.ToUInt16(Data, i); - return chk; - } - // Structure #region Block A public override uint EncryptionConstant diff --git a/PKHeX.Core/PKM/Shared/_K6.cs b/PKHeX.Core/PKM/Shared/_K6.cs index aa0a4fba1..39fcc46c8 100644 --- a/PKHeX.Core/PKM/Shared/_K6.cs +++ b/PKHeX.Core/PKM/Shared/_K6.cs @@ -24,7 +24,7 @@ public abstract class _K6 : PKM protected override ushort CalculateChecksum() { ushort chk = 0; - for (int i = 8; i < 0xE8; i += 2) + for (int i = 8; i < 0xE8; i += 2) // fixed value; pb7 overrides stored size chk += BitConverter.ToUInt16(Data, i); return chk; }