mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-22 01:01:09 -05:00
Simplify default met location fetch
now that IGeneration is available, don't call pkm.GenNumber (slower)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user