mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 04:48:57 -05:00
Add LGPE Adventure Begin Date (#4189)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace PKHeX.Core;
|
||||
namespace PKHeX.Core;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for Accessing named blocks within a Generation 7 LGP/E save file.
|
||||
@@ -16,4 +16,5 @@ public interface ISaveBlock7b
|
||||
PokeListHeader Storage { get; }
|
||||
WB7Records GiftRecords { get; }
|
||||
CaptureRecords Captured { get; }
|
||||
PlayerGeoLocation7b PlayerGeoLocation { get; }
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ public SaveBlockAccessor7b(SAV7b sav)
|
||||
Captured = new CaptureRecords(sav, GetBlockOffset(BelugaBlockIndex.CaptureRecord));
|
||||
FashionPlayer = new Fashion7b(sav, GetBlockOffset(BelugaBlockIndex.FashionPlayer));
|
||||
FashionStarter = new Fashion7b(sav, GetBlockOffset(BelugaBlockIndex.FashionStarter));
|
||||
PlayerGeoLocation = new PlayerGeoLocation7b(sav, GetBlockOffset(BelugaBlockIndex.PlayerGeoLocation));
|
||||
}
|
||||
|
||||
public MyItem Items { get; }
|
||||
@@ -66,6 +67,7 @@ public SaveBlockAccessor7b(SAV7b sav)
|
||||
public CaptureRecords Captured { get; }
|
||||
public Fashion7b FashionPlayer { get; }
|
||||
public Fashion7b FashionStarter { get; }
|
||||
public PlayerGeoLocation7b PlayerGeoLocation { get; }
|
||||
public BlockInfo GetBlock(BelugaBlockIndex index) => BlockInfo[(int)index];
|
||||
public int GetBlockOffset(BelugaBlockIndex index) => GetBlock(index).Offset;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ private void Initialize()
|
||||
public PokeListHeader Storage => Blocks.Storage;
|
||||
public WB7Records GiftRecords => Blocks.GiftRecords;
|
||||
public CaptureRecords Captured => Blocks.Captured;
|
||||
public PlayerGeoLocation7b PlayerGeoLocation => Blocks.PlayerGeoLocation;
|
||||
|
||||
public override IReadOnlyList<InventoryPouch> Inventory { get => Blocks.Items.Inventory; set => Blocks.Items.Inventory = value; }
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
public sealed class PlayerGeoLocation7b : SaveBlock<SAV7b>
|
||||
{
|
||||
public PlayerGeoLocation7b(SAV7b sav, int offset) : base(sav) => Offset = offset;
|
||||
|
||||
public Epoch1970Value AdventureBegin => new(Data.AsMemory(Offset + 0x48));
|
||||
}
|
||||
Reference in New Issue
Block a user