mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-19 00:43:14 +00:00
a885f6b48f
Now loads & saves version-less data fine Co-Authored-By: lusamine <lusamine@users.noreply.github.com>
49 lines
1.1 KiB
C#
49 lines
1.1 KiB
C#
using System;
|
|
using PKHeX.Core;
|
|
|
|
namespace PKHeX.WinForms.Controls
|
|
{
|
|
public partial class PKMEditor
|
|
{
|
|
private void PopulateFieldsPK8()
|
|
{
|
|
if (!(Entity is PK8 pk8))
|
|
throw new FormatException(nameof(Entity));
|
|
|
|
LoadMisc1(pk8);
|
|
LoadMisc2(pk8);
|
|
LoadMisc3(pk8);
|
|
LoadMisc4(pk8);
|
|
LoadMisc6(pk8);
|
|
SizeCP.LoadPKM(pk8);
|
|
LoadMisc8(pk8);
|
|
|
|
LoadPartyStats(pk8);
|
|
UpdateStats();
|
|
}
|
|
|
|
private PK8 PreparePK8()
|
|
{
|
|
if (!(Entity is PK8 pk8))
|
|
throw new FormatException(nameof(Entity));
|
|
|
|
SaveMisc1(pk8);
|
|
SaveMisc2(pk8);
|
|
SaveMisc3(pk8);
|
|
SaveMisc4(pk8);
|
|
SaveMisc6(pk8);
|
|
SaveMisc8(pk8);
|
|
CheckTransferPIDValid(pk8);
|
|
|
|
// Toss in Party Stats
|
|
SavePartyStats(pk8);
|
|
|
|
pk8.FixMoves();
|
|
pk8.FixRelearn();
|
|
if (ModifyPKM)
|
|
pk8.FixMemories();
|
|
pk8.RefreshChecksum();
|
|
return pk8;
|
|
}
|
|
}
|
|
}
|