Simplify default met location fetch

now that IGeneration is available, don't call pkm.GenNumber (slower)
This commit is contained in:
Kurt 2018-03-24 17:28:56 -07:00
parent a6977af19a
commit 1e708a2102

View File

@ -159,7 +159,7 @@ private static bool IsEncounterTradeValid(PKM pkm, EncounterTrade z, int lvl)
return false;
if (pkm.HasOriginalMetLocation)
{
var loc = z.Location > 0 ? z.Location : EncounterTrade.DefaultMetLocation[pkm.GenNumber - 1];
var loc = z.Location > 0 ? z.Location : EncounterTrade.DefaultMetLocation[z.Generation - 1];
if (loc != pkm.Met_Location)
return false;
if (pkm.Format < 5)