Fix foreign traded hatched egg species name

Language/Geolocation does not get modified when an egg hatches.

Thanks @NotRaia
This commit is contained in:
Kaphotics 2016-07-10 22:22:55 -07:00
parent 109bd291f6
commit 0c88954d26

View file

@ -164,8 +164,8 @@ namespace PKHeX
}
// else
{
// Can't have another language name if it hasn't evolved.
return Legal.getHasEvolved(pk6) && PKX.SpeciesLang.Any(lang => lang[pk6.Species] == nickname)
// Can't have another language name if it hasn't evolved or wasn't a language-traded egg.
return (pk6.WasTradedEgg || Legal.getHasEvolved(pk6)) && PKX.SpeciesLang.Any(lang => lang[pk6.Species] == nickname)
|| PKX.SpeciesLang[pk6.Language][pk6.Species] == nickname
? new LegalityCheck(Severity.Valid, "Nickname matches species name.")
: new LegalityCheck(Severity.Invalid, "Nickname does not match species name.");