mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Fix runerigus/yamask partial load fail
320 is max hp (31IV 252EV), is this just -60 from max HP (threshold to evolve at?) might need some more research to see what is going on with this only trycatch in release builds; was confused until I stepped thru and saw the crash
This commit is contained in:
parent
c6ef2a845d
commit
5ddd59c9aa
2 changed files with 14 additions and 0 deletions
|
@ -961,10 +961,20 @@ namespace PKHeX.Core
|
||||||
if (generation < 8)
|
if (generation < 8)
|
||||||
return EMPTY;
|
return EMPTY;
|
||||||
|
|
||||||
|
static string[] GetBlank(int count)
|
||||||
|
{
|
||||||
|
var result = new string[count];
|
||||||
|
for (int i = 0; i < result.Length; i++)
|
||||||
|
result[i] = i.ToString();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
return species switch
|
return species switch
|
||||||
{
|
{
|
||||||
(int) Furfrou when form != 0 => new[] {"0", "1", "2", "3", "4", "5"},
|
(int) Furfrou when form != 0 => new[] {"0", "1", "2", "3", "4", "5"},
|
||||||
(int) Hoopa when form == 1 => new[] {"0", "1", "2", "3"},
|
(int) Hoopa when form == 1 => new[] {"0", "1", "2", "3"},
|
||||||
|
(int) Yamask when form == 1 => GetBlank(320),
|
||||||
|
(int) Runerigus when form == 0 => GetBlank(320), // max Runerigus HP
|
||||||
(int) Alcremie => Enum.GetNames(typeof(AlcremieDecoration)),
|
(int) Alcremie => Enum.GetNames(typeof(AlcremieDecoration)),
|
||||||
_ => EMPTY
|
_ => EMPTY
|
||||||
};
|
};
|
||||||
|
|
|
@ -243,8 +243,12 @@ namespace PKHeX.WinForms.Controls
|
||||||
|
|
||||||
Entity = pk.Clone();
|
Entity = pk.Clone();
|
||||||
|
|
||||||
|
#if !DEBUG
|
||||||
try { GetFieldsfromPKM(); }
|
try { GetFieldsfromPKM(); }
|
||||||
catch { }
|
catch { }
|
||||||
|
#else
|
||||||
|
GetFieldsfromPKM();
|
||||||
|
#endif
|
||||||
|
|
||||||
Stats.UpdateIVs(null, EventArgs.Empty);
|
Stats.UpdateIVs(null, EventArgs.Empty);
|
||||||
UpdatePKRSInfected(null, EventArgs.Empty);
|
UpdatePKRSInfected(null, EventArgs.Empty);
|
||||||
|
|
Loading…
Reference in a new issue