mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-20 13:44:42 -05:00
Fix Mystery Gift edit form save
Closes #4213 Also fixes XY/AO saves not having the button available when they should
This commit is contained in:
@@ -7,7 +7,7 @@ namespace PKHeX.Core;
|
||||
/// Generation 6 <see cref="SaveFile"/> object for <see cref="GameVersion.ORAS"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="SAV6" />
|
||||
public sealed class SAV6AO : SAV6, ISaveBlock6AO, IMultiplayerSprite, IBoxDetailName, IBoxDetailWallpaper, IDaycareMulti
|
||||
public sealed class SAV6AO : SAV6, ISaveBlock6AO, IMultiplayerSprite, IBoxDetailName, IBoxDetailWallpaper, IMysteryGiftStorageProvider, IDaycareMulti
|
||||
{
|
||||
public SAV6AO(byte[] data) : base(data, SaveBlockAccessor6AO.BlockMetadataOffset)
|
||||
{
|
||||
@@ -75,6 +75,7 @@ private void Initialize()
|
||||
MyItem ISaveBlock6Core.Items => Items;
|
||||
SubEventLog6 ISaveBlock6Main.SUBE => SUBE;
|
||||
RecordBlock6 ISaveBlock6Core.Records => Records;
|
||||
IMysteryGiftStorage IMysteryGiftStorageProvider.MysteryGiftStorage => MysteryGift;
|
||||
#endregion
|
||||
|
||||
public override bool IsVersionValid() => Version is GameVersion.AS or GameVersion.OR;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace PKHeX.Core;
|
||||
/// Generation 6 <see cref="SaveFile"/> object for <see cref="GameVersion.XY"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="SAV6" />
|
||||
public sealed class SAV6XY : SAV6, ISaveBlock6XY, IMultiplayerSprite, IBoxDetailName, IBoxDetailWallpaper, IDaycareStorage, IDaycareEggState, IDaycareExperience, IDaycareRandomState<ulong>
|
||||
public sealed class SAV6XY : SAV6, ISaveBlock6XY, IMultiplayerSprite, IBoxDetailName, IBoxDetailWallpaper, IMysteryGiftStorageProvider, IDaycareStorage, IDaycareEggState, IDaycareExperience, IDaycareRandomState<ulong>
|
||||
{
|
||||
public SAV6XY(byte[] data) : base(data, SaveBlockAccessor6XY.BlockMetadataOffset)
|
||||
{
|
||||
@@ -71,6 +71,8 @@ private void Initialize()
|
||||
public SubEventLog6 SUBE => Blocks.SUBE;
|
||||
public ConfigSave6 Config => Blocks.Config;
|
||||
public Encount6 Encount => Blocks.Encount;
|
||||
|
||||
IMysteryGiftStorage IMysteryGiftStorageProvider.MysteryGiftStorage => MysteryGift;
|
||||
#endregion
|
||||
|
||||
protected override void SetDex(PKM pk) => Blocks.Zukan.SetDex(pk);
|
||||
|
||||
@@ -27,8 +27,8 @@ public SAV_Wondercard(SaveFile sav, DataMysteryGift? g = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
|
||||
Cards = GetMysteryGiftProvider(sav);
|
||||
SAV = (Origin = sav).Clone();
|
||||
Cards = GetMysteryGiftProvider(SAV);
|
||||
|
||||
Album = LoadMysteryGifts();
|
||||
Flags = Cards as IMysteryGiftFlags;
|
||||
|
||||
Reference in New Issue
Block a user