From 1e0bf7b6ea07e676aa3fe3145c2dd653da61e4db Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 27 Nov 2017 23:21:14 -0800 Subject: [PATCH] handle hgss volty pikachu trade lang swap en<->fr not sure what FR has for the pikachu language (is it EN? if so the code here works fine); if not, the OT should be checked for lang detection. --- PKHeX.Core/Legality/Checks.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PKHeX.Core/Legality/Checks.cs b/PKHeX.Core/Legality/Checks.cs index ad4344e58..8f757974f 100644 --- a/PKHeX.Core/Legality/Checks.cs +++ b/PKHeX.Core/Legality/Checks.cs @@ -355,7 +355,12 @@ namespace PKHeX.Core return; } if (pkm.HGSS) - VerifyTradeTable(Encounters4.TradeHGSS, Encounters4.TradeGift_HGSS); + { + int lang = pkm.Language; + if (EncounterMatch.Species == 25 && (lang == 2 || lang == 3)) // EN & FR + lang ^= 1; // toggle for Volty + VerifyTradeTable(Encounters4.TradeHGSS, Encounters4.TradeGift_HGSS, lang); + } else { if (EncounterMatch.Species == 129) // Magikarp @@ -403,7 +408,7 @@ namespace PKHeX.Core private void VerifyTradeTable(string[][] ots, EncounterTrade[] table) => VerifyTradeTable(ots, table, pkm.Language); private void VerifyTradeTable(string[][] ots, EncounterTrade[] table, int language) { - var validOT = language >= ots.Length ? ots[0] : ots[pkm.Language]; + var validOT = language >= ots.Length ? ots[0] : ots[language]; var index = Array.IndexOf(table, EncounterMatch); VerifyTradeOTNick(validOT, index); }