PKHeX/PKHeX.WinForms/Controls/PKM Editor/EditPK9.cs
Kurt 03182ebd3d Update 22.11.24
Adds support for Scarlet & Violet.

Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-11-24 17:42:17 -08:00

47 lines
964 B
C#

using System;
using PKHeX.Core;
namespace PKHeX.WinForms.Controls;
public partial class PKMEditor
{
private void PopulateFieldsPK9()
{
if (Entity is not PK9 pk9)
throw new FormatException(nameof(Entity));
LoadMisc1(pk9);
LoadMisc2(pk9);
LoadMisc3(pk9);
LoadMisc4(pk9);
LoadMisc6(pk9);
SizeCP.LoadPKM(pk9);
LoadMisc9(pk9);
LoadPartyStats(pk9);
UpdateStats();
}
private PK9 PreparePK9()
{
if (Entity is not PK9 pk9)
throw new FormatException(nameof(Entity));
SaveMisc1(pk9);
SaveMisc2(pk9);
SaveMisc3(pk9);
SaveMisc4(pk9);
SaveMisc6(pk9);
SaveMisc9(pk9);
// Toss in Party Stats
SavePartyStats(pk9);
pk9.FixMoves();
pk9.FixRelearn();
if (ModifyPKM)
pk9.FixMemories();
pk9.RefreshChecksum();
return pk9;
}
}