Add raid/fashion block accessors

set breakpoint at end of ctor... immediate window dump:
System.IO.File.WriteAllBytes(@"E:\raid.bin", Raid.Data);
This commit is contained in:
Kurt
2019-11-21 22:26:24 -08:00
parent ea20b436ad
commit 1ffee3de02
3 changed files with 19 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ public class SaveBlockAccessorSWSH : ISaveBlockAccessor<SCBlock>, ISaveBlock8Mai
public Daycare8 Daycare { get; }
public Record8 Records { get; }
public TrainerCard8 TrainerCard{ get; }
public FashionUnlock8 Fashion { get; }
public RaidSpawnList8 Raid { get; }
public SaveBlockAccessorSWSH(SAV8SWSH sav)
{
@@ -33,6 +35,8 @@ public SaveBlockAccessorSWSH(SAV8SWSH sav)
Fused = new Fused8(sav, GetBlock(IFused));
Daycare = new Daycare8(sav, GetBlock(IDaycare));
Records = new Record8(sav, GetBlock(IRecord), Core.Records.MaxType_SWSH);
Fashion = new FashionUnlock8(sav, GetBlock(IFashionUnlock));
Raid = new RaidSpawnList8(sav, GetBlock(IRaidSpawnList));
}
private const int IBox = 143; // Box Data
@@ -47,6 +51,7 @@ public SaveBlockAccessorSWSH(SAV8SWSH sav)
private const int IZukan = 699; // PokeDex
private const int ITrainerCard = 1259; // Trainer Card
private const int IPlayTime = 1302; // Time Played
private const int IRaidSpawnList = 1326; // Nest current values (hash, seed, meta)
private const int IRepel = 1469;
private const int IFused = 1789; // Fused PKM (*3)
private const int IFashionUnlock = 1989; // Fashion unlock bool array (owned for (each apparel type) * 0x80, then another array for "new")

View File

@@ -0,0 +1,7 @@
namespace PKHeX.Core
{
public sealed class FashionUnlock8 : SaveBlock
{
public FashionUnlock8(SaveFile sav, SCBlock block) : base(sav, block.Data) { }
}
}

View File

@@ -0,0 +1,7 @@
namespace PKHeX.Core
{
public sealed class RaidSpawnList8 : SaveBlock
{
public RaidSpawnList8(SaveFile sav, SCBlock block) : base(sav, block.Data) { }
}
}