mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
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
This commit is contained in:
parent
e08ecb21c1
commit
19f49eb4a7
|
|
@ -242,7 +242,7 @@ private static IEnumerable<EncounterArea> 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<EncounterArea> 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++]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user