mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 22:26:44 -05:00
Ingame Trade exclusion
Return early if not ingame trade
This commit is contained in:
@@ -258,6 +258,8 @@ internal static EncounterStatic getValidStaticEncounter(PK6 pk6)
|
||||
}
|
||||
internal static EncounterTrade getValidIngameTrade(PK6 pk6)
|
||||
{
|
||||
if (!pk6.WasIngameTrade)
|
||||
return null;
|
||||
int lang = pk6.Language;
|
||||
if (lang == 0)
|
||||
return null;
|
||||
@@ -287,7 +289,7 @@ internal static EncounterTrade getValidIngameTrade(PK6 pk6)
|
||||
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 @@ public void TradeFriendshipAffection(string SAV_TRAINER)
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user