diff --git a/PKHeX.Core/Editing/Saves/Slots/Extensions.cs b/PKHeX.Core/Editing/Saves/Slots/Extensions.cs index 46f463005..39b98d55e 100644 --- a/PKHeX.Core/Editing/Saves/Slots/Extensions.cs +++ b/PKHeX.Core/Editing/Saves/Slots/Extensions.cs @@ -228,7 +228,11 @@ private static List GetExtraSlots8a(SAV8LA _) private static List GetExtraSlots9(SAV9SV sav) { - var list = new List(); + var list = new List + { + new(sav.BoxInfo.Data, 0, sav.GetBoxOffset(BoxLayout9.BoxCount), true, Mutable: true) { Type = StorageSlotType.Party }, + }; + var block = sav.Blocks.GetBlockSafe(SaveBlockAccessor9SV.KFusedCalyrex); var c = new SlotInfoMisc(block.Data, 3, 0, true) { Type = StorageSlotType.Fused }; list.Add(c); diff --git a/PKHeX.Core/Editing/Saves/Slots/Info/SlotInfoMisc.cs b/PKHeX.Core/Editing/Saves/Slots/Info/SlotInfoMisc.cs index 144059b1c..2e579ed6f 100644 --- a/PKHeX.Core/Editing/Saves/Slots/Info/SlotInfoMisc.cs +++ b/PKHeX.Core/Editing/Saves/Slots/Info/SlotInfoMisc.cs @@ -3,11 +3,11 @@ namespace PKHeX.Core; /// /// Miscellaneous origination /// -public sealed record SlotInfoMisc(byte[] Data, int Slot, int Offset, bool PartyFormat = false) : ISlotInfo +public sealed record SlotInfoMisc(byte[] Data, int Slot, int Offset, bool PartyFormat = false, bool Mutable = false) : ISlotInfo { public SlotOrigin Origin => PartyFormat ? SlotOrigin.Party : SlotOrigin.Box; - public bool CanWriteTo(SaveFile sav) => false; - public WriteBlockedMessage CanWriteTo(SaveFile sav, PKM pk) => WriteBlockedMessage.InvalidDestination; + public bool CanWriteTo(SaveFile sav) => Mutable; + public WriteBlockedMessage CanWriteTo(SaveFile sav, PKM pk) => Mutable ? WriteBlockedMessage.None : WriteBlockedMessage.InvalidDestination; public StorageSlotType Type { get; init; } public SlotInfoMisc(SaveFile sav, int slot, int offset, bool party = false) : this(GetBuffer(sav), slot, offset, party) { } diff --git a/PKHeX.Core/Saves/SAV9SV.cs b/PKHeX.Core/Saves/SAV9SV.cs index bf0ac2509..4bf3e7276 100644 --- a/PKHeX.Core/Saves/SAV9SV.cs +++ b/PKHeX.Core/Saves/SAV9SV.cs @@ -276,6 +276,12 @@ public override void SetBoxWallpaper(int box, int value) b.Data[box] = (byte)value; } + public byte BoxLegendWallpaperFlag + { + get => Blocks.GetBlock(SaveBlockAccessor9SV.KBoxWallpapers).Data[BoxLayout9.BoxCount]; + set => Blocks.GetBlock(SaveBlockAccessor9SV.KBoxWallpapers).Data[BoxLayout9.BoxCount] = value; + } + public void CollectAllStakes() { for (int i = 14; i <= 17; i++)