From 24ac0d9d4baf7e84ba400323c1464d30ab91aef3 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 25 Nov 2019 19:29:12 -0800 Subject: [PATCH] Fix WasLink comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2525 G4Celebi & G6Link met location match; Pokémon Link was only available for Gen6 so just check for that origin. Ty @Ammako tbh I shouldn't even have this property ha --- PKHeX.Core/PKM/PK8.cs | 2 +- PKHeX.Core/PKM/Shared/G6PKM.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PKHeX.Core/PKM/PK8.cs b/PKHeX.Core/PKM/PK8.cs index a1157c9e9..fa7f56427 100644 --- a/PKHeX.Core/PKM/PK8.cs +++ b/PKHeX.Core/PKM/PK8.cs @@ -68,7 +68,7 @@ public PK8(byte[] data) public override byte[] Nickname_Trash { get => GetData(0x58, 24); set { if (value?.Length == 24) value.CopyTo(Data, 0x58); } } public override byte[] HT_Trash { get => GetData(0xA8, 24); set { if (value?.Length == 24) value.CopyTo(Data, 0xA8); } } public override byte[] OT_Trash { get => GetData(0xF8, 24); set { if (value?.Length == 24) value.CopyTo(Data, 0xF8); } } - public override bool WasLink => Met_Location == Locations.LinkGift6; + public override bool WasLink => Met_Location == Locations.LinkGift6 && Gen6; public override bool WasEvent => Locations.IsEventLocation5(Met_Location) || FatefulEncounter; public override bool WasEventEgg => GenNumber < 5 ? base.WasEventEgg : (Locations.IsEventLocation5(Egg_Location) || (FatefulEncounter && Egg_Location == Locations.LinkTrade6)) && Met_Level == 1; diff --git a/PKHeX.Core/PKM/Shared/G6PKM.cs b/PKHeX.Core/PKM/Shared/G6PKM.cs index 1f7daa005..17e4f499b 100644 --- a/PKHeX.Core/PKM/Shared/G6PKM.cs +++ b/PKHeX.Core/PKM/Shared/G6PKM.cs @@ -119,7 +119,7 @@ public virtual void TradeMemory(bool Bank) } // Legality Properties - public override bool WasLink => Met_Location == Locations.LinkGift6; + public override bool WasLink => Met_Location == Locations.LinkGift6 && Gen6; public override bool WasEvent => Locations.IsEventLocation5(Met_Location) || FatefulEncounter; public override bool WasEventEgg => GenNumber < 5 ? base.WasEventEgg : (Locations.IsEventLocation5(Egg_Location) || (FatefulEncounter && Egg_Location == Locations.LinkTrade6)) && Met_Level == 1;