mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 22:08:35 +00:00
Ingame Trade exclusion
Return early if not ingame trade
This commit is contained in:
parent
ae424cb116
commit
a277b4a734
2 changed files with 4 additions and 1 deletions
|
@ -258,6 +258,8 @@ namespace PKHeX
|
|||
}
|
||||
internal static EncounterTrade getValidIngameTrade(PK6 pk6)
|
||||
{
|
||||
if (!pk6.WasIngameTrade)
|
||||
return null;
|
||||
int lang = pk6.Language;
|
||||
if (lang == 0)
|
||||
return null;
|
||||
|
@ -287,7 +289,7 @@ namespace PKHeX
|
|||
return null;
|
||||
if (z.Level != pk6.Met_Level)
|
||||
return null;
|
||||
if (z.Nature != Nature.Random && ((int)z.Nature != pk6.Nature))
|
||||
if (z.Nature != Nature.Random && (int)z.Nature != pk6.Nature)
|
||||
return null;
|
||||
if (z.Gender != pk6.Gender)
|
||||
return null;
|
||||
|
|
|
@ -752,5 +752,6 @@ namespace PKHeX
|
|||
public bool WasEvent => FatefulEncounter && Met_Location > 40000;
|
||||
public bool WasEventEgg => FatefulEncounter && (Egg_Location > 40000 || Egg_Location == 30002) && Met_Level == 1;
|
||||
public bool WasTradedEgg => Egg_Location == 30002;
|
||||
public bool WasIngameTrade => Met_Location == 30001;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue