remove redundant/repetitive match update (updateTypeInfo with Format>=7
already updates the encountermatch just prior to this method call)
This commit is contained in:
Kurt 2017-10-20 20:10:13 -07:00
parent f85910abe2
commit 0e24b5237e

View file

@ -233,14 +233,6 @@ namespace PKHeX.Core
}
private void UpdateTypeInfo()
{
if (pkm.Format >= 7)
{
if (pkm.VC1)
Info.EncounterMatch = EncounterGenerator.GetRBYStaticTransfer(pkm.Species, pkm.Met_Level);
else if (pkm.VC2)
Info.EncounterMatch = EncounterGenerator.GetGSStaticTransfer(pkm.Species, pkm.Met_Level);
}
if (pkm.GenNumber <= 2 && pkm.TradebackStatus == TradebackType.Any && (EncounterMatch as GBEncounterData)?.Generation != pkm.GenNumber)
// Example: GSC Pokemon with only possible encounters in RBY, like the legendary birds
pkm.TradebackStatus = TradebackType.WasTradeback;