Check format 3/4 for setpidnature

This commit is contained in:
Kurt 2021-02-02 15:39:41 -08:00
parent 78cc0098b3
commit 21e1e6def5

View file

@ -174,9 +174,10 @@ namespace PKHeX.Core
public static void SetNature(this PKM pk, int nature)
{
var value = Math.Min((int)Nature.Quirky, Math.Max((int)Nature.Hardy, nature));
if (pk.Format >= 8)
var format = pk.Format;
if (format >= 8)
pk.StatNature = value;
else if (pk.Format <= 4)
else if (format is 3 or 4)
pk.SetPIDNature(value);
else
pk.Nature = value;