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