mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Check format 3/4 for setpidnature
This commit is contained in:
parent
78cc0098b3
commit
21e1e6def5
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue