Clear boxes after initialize

Closes #2349
This commit is contained in:
Kurt 2019-07-05 11:53:13 -07:00
parent 808c1d2992
commit 810f7271c6
3 changed files with 15 additions and 3 deletions

View file

@ -14,7 +14,7 @@ namespace PKHeX.Core
public override string Extension => string.Empty;
protected SAV6(byte[] data, BlockInfo[] blocks, int biOffset) : base(data, blocks, biOffset) { }
protected SAV6(int size, BlockInfo[] blocks, int biOffset) : base(size, blocks, biOffset) => ClearBoxes();
protected SAV6(int size, BlockInfo[] blocks, int biOffset) : base(size, blocks, biOffset) { }
// Configuration
public override int SIZE_STORED => PKX.SIZE_6STORED;

View file

@ -11,7 +11,13 @@ namespace PKHeX.Core
public sealed class SAV6AO : SAV6, IPokePuff, IOPower, ILink
{
public SAV6AO(byte[] data) : base(data, BlocksAO, boAO) => Initialize();
public SAV6AO() : base(SaveUtil.SIZE_G6ORAS, BlocksAO, boAO) => Initialize();
public SAV6AO() : base(SaveUtil.SIZE_G6ORAS, BlocksAO, boAO)
{
Initialize();
ClearBoxes();
}
public override SaveFile Clone() => new SAV6AO((byte[])Data.Clone());
public override int MaxMoveID => Legal.MaxMoveID_6_AO;
public override int MaxItemID => Legal.MaxItemID_6_AO;

View file

@ -10,7 +10,13 @@ namespace PKHeX.Core
public sealed class SAV6XY : SAV6, IPokePuff, IOPower, ILink
{
public SAV6XY(byte[] data) : base(data, BlocksXY, boXY) => Initialize();
public SAV6XY() : base(SaveUtil.SIZE_G6XY, BlocksXY, boXY) => Initialize();
public SAV6XY() : base(SaveUtil.SIZE_G6XY, BlocksXY, boXY)
{
Initialize();
ClearBoxes();
}
public override SaveFile Clone() => new SAV6XY((byte[])Data.Clone());
public override int MaxMoveID => Legal.MaxMoveID_6_XY;
public override int MaxItemID => Legal.MaxItemID_6_XY;