diff --git a/PKHeX.Core/Editing/Saves/Slots/Extensions.cs b/PKHeX.Core/Editing/Saves/Slots/Extensions.cs
index 7f4d1614c..902b51d83 100644
--- a/PKHeX.Core/Editing/Saves/Slots/Extensions.cs
+++ b/PKHeX.Core/Editing/Saves/Slots/Extensions.cs
@@ -142,12 +142,19 @@ namespace PKHeX.Core
new(sav.Data, 0, sav.AllBlocks[07].Offset) {Type = StorageSlotType.GTS},
new(sav.Data, 0, sav.GetFusedSlotOffset(0)) {Type = StorageSlotType.Fused}
};
- if (sav is SAV7USUM)
+ if (sav is SAV7USUM uu)
{
list.AddRange(new[]
{
- new SlotInfoMisc(sav.Data, 1, sav.GetFusedSlotOffset(1)) {Type = StorageSlotType.Fused},
- new SlotInfoMisc(sav.Data, 2, sav.GetFusedSlotOffset(2)) {Type = StorageSlotType.Fused},
+ new SlotInfoMisc(uu.Data, 1, uu.GetFusedSlotOffset(1)) {Type = StorageSlotType.Fused},
+ new SlotInfoMisc(uu.Data, 2, uu.GetFusedSlotOffset(2)) {Type = StorageSlotType.Fused},
+ });
+ var ba = uu.BattleAgency;
+ list.AddRange(new[]
+ {
+ new SlotInfoMisc(uu.Data, 0, ba.GetSlotOffset(0)) {Type = StorageSlotType.Misc},
+ new SlotInfoMisc(uu.Data, 1, ba.GetSlotOffset(1)) {Type = StorageSlotType.Misc},
+ new SlotInfoMisc(uu.Data, 2, ba.GetSlotOffset(2)) {Type = StorageSlotType.Misc},
});
}
diff --git a/PKHeX.Core/Saves/Access/ISaveBlock7USUM.cs b/PKHeX.Core/Saves/Access/ISaveBlock7USUM.cs
index 3e6ee059c..33ba00841 100644
--- a/PKHeX.Core/Saves/Access/ISaveBlock7USUM.cs
+++ b/PKHeX.Core/Saves/Access/ISaveBlock7USUM.cs
@@ -6,7 +6,7 @@
/// Blocks specific for in addition to the blocks.
public interface ISaveBlock7USUM : ISaveBlock7Main
{
- // BattleFesSave
+ BattleAgency7 BattleAgency { get; }
// FinderStudioSave
}
}
diff --git a/PKHeX.Core/Saves/Access/SaveBlockAccessor7USUM.cs b/PKHeX.Core/Saves/Access/SaveBlockAccessor7USUM.cs
index e20c036a2..0d18bb3ec 100644
--- a/PKHeX.Core/Saves/Access/SaveBlockAccessor7USUM.cs
+++ b/PKHeX.Core/Saves/Access/SaveBlockAccessor7USUM.cs
@@ -77,6 +77,7 @@ namespace PKHeX.Core
Records = new RecordBlock6(sav, bi[28].Offset);
BattleTree = new BattleTree7(sav, bi[32].Offset);
Daycare = new Daycare7(sav, bi[33].Offset);
+ BattleAgency = new BattleAgency7(sav, bi[37].Offset);
}
public IReadOnlyList BlockInfo => BlockInfoUSUM;
@@ -101,5 +102,6 @@ namespace PKHeX.Core
public FieldMenu7 FieldMenu { get; }
public FashionBlock7 Fashion { get; }
public HallOfFame7 Fame { get; }
+ public BattleAgency7 BattleAgency { get; }
}
}
diff --git a/PKHeX.Core/Saves/SAV7USUM.cs b/PKHeX.Core/Saves/SAV7USUM.cs
index 5a0f736fd..ea321fad9 100644
--- a/PKHeX.Core/Saves/SAV7USUM.cs
+++ b/PKHeX.Core/Saves/SAV7USUM.cs
@@ -66,6 +66,7 @@ namespace PKHeX.Core
public override FieldMenu7 FieldMenu => Blocks.FieldMenu;
public override FashionBlock7 Fashion => Blocks.Fashion;
public override HallOfFame7 Fame => Blocks.Fame;
+ public BattleAgency7 BattleAgency => Blocks.BattleAgency;
#endregion
}
}
diff --git a/PKHeX.Core/Saves/Substructures/Gen7/BattleAgency7.cs b/PKHeX.Core/Saves/Substructures/Gen7/BattleAgency7.cs
new file mode 100644
index 000000000..150cdd3a2
--- /dev/null
+++ b/PKHeX.Core/Saves/Substructures/Gen7/BattleAgency7.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace PKHeX.Core
+{
+ public sealed class BattleAgency7 : SaveBlock
+ {
+ public BattleAgency7(SAV7USUM sav, int offset) : base(sav) => Offset = offset;
+
+ public int GetSlotOffset(int slot) => Offset + slot switch
+ {
+ 0 => 0,
+ 1 => PokeCrypto.SIZE_6STORED,
+ 2 => 0x220,
+ _ => throw new ArgumentOutOfRangeException(nameof(slot)),
+ };
+ }
+}