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
This commit is contained in:
Kurt 2019-02-09 13:17:00 -08:00
parent 19ae752937
commit cb98c83bd2
2 changed files with 2 additions and 2 deletions

View file

@ -793,7 +793,7 @@ namespace PKHeX.Core
{ {
if (!isParty) if (!isParty)
return; return;
if (pkm.Stat_HPMax != 0) // Stats already present if (pkm.PartyStatsPresent) // Stats already present
return; return;
pkm.SetStats(pkm.GetStats(pkm.PersonalInfo)); pkm.SetStats(pkm.GetStats(pkm.PersonalInfo));
pkm.Stat_Level = pkm.CurrentLevel; pkm.Stat_Level = pkm.CurrentLevel;

View file

@ -247,7 +247,7 @@ namespace PKHeX.WinForms.Controls
if (HaX) // Load original values from pk not pkm 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(); TB_EXP.Text = pk.EXP.ToString();
MT_Form.Text = Math.Max(0, pk.AltForm).ToString(); MT_Form.Text = Math.Max(0, pk.AltForm).ToString();
if (pk.PartyStatsPresent) // stats present if (pk.PartyStatsPresent) // stats present