Update EncounterStatic8a.cs

This commit is contained in:
Kurt
2023-08-18 08:38:00 -07:00
parent 07042233be
commit 0b2d167465

View File

@@ -69,13 +69,9 @@ public PA8 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
Version = (int)Version,
IsAlpha = IsAlpha,
Ball = (byte)(FixedBall == Ball.None ? Ball.LAPoke : FixedBall),
HeightScalar = HasFixedHeight ? HeightScalar : PokeSizeUtil.GetRandomScalar(),
WeightScalar = HasFixedWeight ? WeightScalar : PokeSizeUtil.GetRandomScalar(),
Nickname = SpeciesName.GetSpeciesNameGeneration(Species, lang, Generation),
};
SetPINGA(pk, criteria);
pk.Scale = pk.HeightScalar;
pk.ResetHeight();
pk.ResetWeight();
SetEncounterMoves(pk, (byte)pk.Met_Level);
@@ -97,6 +93,12 @@ private void SetPINGA(PA8 pk, EncounterCriteria criteria)
if (Method == EncounterStatic8aCorrelation.Fixed)
pk.EncryptionConstant = Util.Rand32();
if (HasFixedHeight)
pk.HeightScalar = HeightScalar;
if (HasFixedWeight)
pk.WeightScalar = WeightScalar;
pk.Scale = pk.HeightScalar;
}
private void SetEncounterMoves(PA8 pk, int level)