mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-26 20:07:15 -05: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:
@@ -961,10 +961,20 @@ public static string[] GetFormArgumentStrings(int species, int form, int generat
|
||||
if (generation < 8)
|
||||
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
|
||||
{
|
||||
(int) Furfrou when form != 0 => new[] {"0", "1", "2", "3", "4", "5"},
|
||||
(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)),
|
||||
_ => EMPTY
|
||||
};
|
||||
|
||||
@@ -243,8 +243,12 @@ private void LoadFieldsFromPKM(PKM pk, bool focus = true, bool skipConversionChe
|
||||
|
||||
Entity = pk.Clone();
|
||||
|
||||
#if !DEBUG
|
||||
try { GetFieldsfromPKM(); }
|
||||
catch { }
|
||||
#else
|
||||
GetFieldsfromPKM();
|
||||
#endif
|
||||
|
||||
Stats.UpdateIVs(null, EventArgs.Empty);
|
||||
UpdatePKRSInfected(null, EventArgs.Empty);
|
||||
|
||||
Reference in New Issue
Block a user