From 9f480dcbe2bd875697281097c0b8f5cabe4b9986 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 5 Dec 2022 14:10:00 -0800 Subject: [PATCH] Set fixed gender for static9 Closes #3671 --- .../Encounters/EncounterStatic/EncounterStatic9.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic9.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic9.cs index 9fc8f568e..27d72dcdf 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic9.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic9.cs @@ -67,7 +67,7 @@ protected override void ApplyDetails(ITrainerInfo tr, EncounterCriteria criteria height = weight = Gift ? Size : undefinedSize; scale = Size; } - + const byte rollCount = 1; var pi = PersonalTable.SV.GetFormEntry(Species, Form); var param = new GenerateParam9((byte)pi.Gender, FlawlessIVCount, rollCount, height, weight, scale, Ability, Shiny); @@ -76,7 +76,6 @@ protected override void ApplyDetails(ITrainerInfo tr, EncounterCriteria criteria var success = this.TryApply64(pk9, init, param, criteria, IVs.IsSpecified); if (!success) this.TryApply64(pk9, init, param, EncounterCriteria.Unrestricted, IVs.IsSpecified); - if (IVs.IsSpecified) { pk.IV_HP = IVs.HP; @@ -87,8 +86,8 @@ protected override void ApplyDetails(ITrainerInfo tr, EncounterCriteria criteria pk.IV_SPE = IVs.SPE; } if (Nature != Nature.Random) - { pk.Nature = pk.StatNature = (int)Nature; - } + if (Gender != -1) + pk.Gender = (byte)Gender; } }