mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Use trainer details for manaphy egg if possible
https://projectpokemon.org/home/forums/topic/57790-bug-manaphy-egg-shown-illegal-wrong-egg-met-date-if-i-import-directly-the-pgt/?tab=comments#comment-260826
This commit is contained in:
parent
9191f023a3
commit
187ed9775a
|
|
@ -135,7 +135,7 @@ public override PKM ConvertToPKM(ITrainerInfo sav, EncounterCriteria criteria)
|
|||
}
|
||||
|
||||
if (IsManaphyEgg)
|
||||
SetDefaultManaphyEggDetails(pk4);
|
||||
SetDefaultManaphyEggDetails(pk4, sav);
|
||||
|
||||
SetPINGA(pk4, criteria);
|
||||
SetMetData(pk4, sav);
|
||||
|
|
@ -166,7 +166,7 @@ private void SetMetData(PK4 pk4, ITrainerInfo trainer)
|
|||
}
|
||||
}
|
||||
|
||||
private static void SetDefaultManaphyEggDetails(PK4 pk4)
|
||||
private static void SetDefaultManaphyEggDetails(PK4 pk4, ITrainerInfo trainer)
|
||||
{
|
||||
// Since none of this data is populated, fill in default info.
|
||||
pk4.Species = (int)Core.Species.Manaphy;
|
||||
|
|
@ -178,8 +178,8 @@ private static void SetDefaultManaphyEggDetails(PK4 pk4)
|
|||
pk4.Ability = (int)Ability.Hydration;
|
||||
pk4.FatefulEncounter = true;
|
||||
pk4.Ball = (int)Core.Ball.Poke;
|
||||
pk4.Version = (int)GameVersion.D;
|
||||
pk4.Language = (int)LanguageID.English;
|
||||
pk4.Version = GameVersion.Gen4.Contains(trainer.Game) ? trainer.Game : (int)GameVersion.D;
|
||||
pk4.Language = trainer.Language < (int)LanguageID.Korean ? trainer.Language : (int)LanguageID.English;
|
||||
pk4.Egg_Location = 1; // Ranger (will be +3000 later)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user