mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-25 20:07:09 +00:00
Gen4 is the same struct, move to earlier game's class. Still need to unshuffle the personals by natdex ID for gen3 games. Tutors/TMHM aren't referenced so they can be appended if (n)ever desired
24 lines
608 B
C#
24 lines
608 B
C#
using System.Linq;
|
|
|
|
namespace PKHeX
|
|
{
|
|
public class PersonalInfoG4 : PersonalInfoG3
|
|
{
|
|
public PersonalInfoG4(byte[] data)
|
|
{
|
|
if (data.Length != SIZE_G4)
|
|
return;
|
|
Data = data;
|
|
|
|
// Unpack TMHM & Tutors
|
|
TMHM = getBits(Data.Skip(0x1C).Take(0x0D).ToArray());
|
|
TypeTutors = new bool[0]; // not stored in personal
|
|
}
|
|
public override byte[] Write()
|
|
{
|
|
setBits(TMHM).CopyTo(Data, 0x28);
|
|
// setBits(TypeTutors).CopyTo(Data, 0x38);
|
|
return Data;
|
|
}
|
|
}
|
|
}
|