From cb98c83bd2bd47f90f6fd4c3c95c4149aa20647a Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 9 Feb 2019 13:17:00 -0800 Subject: [PATCH] Remove references to Stat_HPMax use computed value to check if Party Stats are present maybe I want to use Span and stop resizing all pkm arrays to party format years from now idk --- PKHeX.Core/Saves/SaveFile.cs | 2 +- PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PKHeX.Core/Saves/SaveFile.cs b/PKHeX.Core/Saves/SaveFile.cs index 87910290a..f16e3af21 100644 --- a/PKHeX.Core/Saves/SaveFile.cs +++ b/PKHeX.Core/Saves/SaveFile.cs @@ -793,7 +793,7 @@ namespace PKHeX.Core { if (!isParty) return; - if (pkm.Stat_HPMax != 0) // Stats already present + if (pkm.PartyStatsPresent) // Stats already present return; pkm.SetStats(pkm.GetStats(pkm.PersonalInfo)); pkm.Stat_Level = pkm.CurrentLevel; diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index 584c4137c..642720b0d 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -247,7 +247,7 @@ namespace PKHeX.WinForms.Controls if (HaX) // Load original values from pk not pkm { - MT_Level.Text = (pk.Stat_HPMax != 0 ? pk.Stat_Level : Experience.GetLevel(pk.EXP, pk.Species, pk.AltForm)).ToString(); + MT_Level.Text = (pk.PartyStatsPresent ? pk.Stat_Level : Experience.GetLevel(pk.EXP, pk.Species, pk.AltForm)).ToString(); TB_EXP.Text = pk.EXP.ToString(); MT_Form.Text = Math.Max(0, pk.AltForm).ToString(); if (pk.PartyStatsPresent) // stats present