mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 12:35:20 -05:00
Fix gen2 met data setting
This commit is contained in:
parent
d4e38dded0
commit
39f1805940
|
|
@ -84,9 +84,17 @@ public PKM ConvertToPKM(ITrainerInfo SAV)
|
|||
pk.Gender = gender = pk.GetSaneGender(gender);
|
||||
pk.Nickname = PKX.GetSpeciesNameGeneration(Species, lang, Generation);
|
||||
pk.Ball = 4;
|
||||
pk.Met_Level = level;
|
||||
pk.Met_Location = Location;
|
||||
pk.MetDate = DateTime.Today;
|
||||
|
||||
if (pk.Format > 2 || Version == GameVersion.C)
|
||||
{
|
||||
pk.Met_Location = Location;
|
||||
pk.Met_Level = level;
|
||||
if (Version == GameVersion.C && pk is PK2 pk2 && this is EncounterSlot1 slot)
|
||||
pk2.Met_TimeOfDay = slot.Time.RandomValidTime();
|
||||
|
||||
if (pk.Format >= 4)
|
||||
pk.MetDate = DateTime.Today;
|
||||
}
|
||||
pk.Language = lang;
|
||||
|
||||
pk.SetRandomIVs(flawless: 3);
|
||||
|
|
|
|||
|
|
@ -96,9 +96,16 @@ public PKM ConvertToPKM(ITrainerInfo SAV)
|
|||
}
|
||||
pk.Nickname = PKX.GetSpeciesNameGeneration(Species, lang, Generation);
|
||||
pk.Ball = Ball;
|
||||
pk.Met_Level = level;
|
||||
pk.Met_Location = Location;
|
||||
pk.MetDate = today;
|
||||
if (pk.Format > 2 || Version == GameVersion.C)
|
||||
{
|
||||
pk.Met_Location = Location;
|
||||
pk.Met_Level = level;
|
||||
if (Version == GameVersion.C && pk is PK2 pk2)
|
||||
pk2.Met_TimeOfDay = EncounterTime.Any.RandomValidTime();
|
||||
|
||||
if (pk.Format >= 4)
|
||||
pk.MetDate = DateTime.Today;
|
||||
}
|
||||
if (EggEncounter)
|
||||
{
|
||||
pk.Egg_Location = EggLocation;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user