2016-07-03 03:25:47 +00:00
|
|
|
|
using System.Linq;
|
2016-07-03 03:24:17 +00:00
|
|
|
|
|
|
|
|
|
namespace PKHeX
|
|
|
|
|
{
|
|
|
|
|
public class PersonalInfoXY : PersonalInfoBW
|
|
|
|
|
{
|
|
|
|
|
protected PersonalInfoXY() { } // For ORAS
|
2016-07-18 05:39:18 +00:00
|
|
|
|
public new const int SIZE = 0x40;
|
2016-07-03 03:24:17 +00:00
|
|
|
|
public PersonalInfoXY(byte[] data)
|
|
|
|
|
{
|
2016-07-18 05:39:18 +00:00
|
|
|
|
if (data.Length != SIZE)
|
2016-07-03 03:24:17 +00:00
|
|
|
|
return;
|
|
|
|
|
Data = data;
|
|
|
|
|
|
2016-07-03 03:25:47 +00:00
|
|
|
|
// Unpack TMHM & Tutors
|
2016-07-03 03:24:17 +00:00
|
|
|
|
TMHM = getBits(Data.Skip(0x28).Take(0x10).ToArray());
|
|
|
|
|
TypeTutors = getBits(Data.Skip(0x38).Take(0x4).ToArray());
|
|
|
|
|
// 0x3C-0x40 unknown
|
|
|
|
|
}
|
|
|
|
|
public override byte[] Write()
|
|
|
|
|
{
|
|
|
|
|
setBits(TMHM).CopyTo(Data, 0x28);
|
|
|
|
|
setBits(TypeTutors).CopyTo(Data, 0x38);
|
|
|
|
|
return Data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|