From ea518e2ece237f86e62e7bc2a044acc84f88342d Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 27 Feb 2017 18:22:28 -0800 Subject: [PATCH] Remove pkm personalinfo reference Gen7 bits were shuffled relative to gen6, so fetching gen6 with gen7 bitflags will yield the wrong tutor moves. --- PKHeX/Legality/Core.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PKHeX/Legality/Core.cs b/PKHeX/Legality/Core.cs index 50f0c9177..9ef325728 100644 --- a/PKHeX/Legality/Core.cs +++ b/PKHeX/Legality/Core.cs @@ -1277,7 +1277,7 @@ namespace PKHeX.Core slotMax = slotMax.Clone(); slotMax.Pressure = true; slotMax.Form = pkm.AltForm; - }; + } if (gen >= 6 && !DexNav) { @@ -1557,7 +1557,7 @@ namespace PKHeX.Core private static IEnumerable getTutorMoves(PKM pkm, int species, int form, bool specialTutors, int generation) { List moves = new List(); - PersonalInfo info = pkm.PersonalInfo; + PersonalInfo info; switch (generation) { case 1: @@ -1576,6 +1576,7 @@ namespace PKHeX.Core // // moves.Add(Tutors_B2W2[i][b]); //} case 6: + info = PersonalTable.AO[species]; moves.AddRange(TypeTutor6.Where((t, i) => info.TypeTutors[i])); if ( pkm.InhabitedGeneration(6) && specialTutors && (pkm.AO || !pkm.IsUntraded)) { @@ -1587,6 +1588,7 @@ namespace PKHeX.Core } break; case 7: + info = PersonalTable.SM[species]; // Type Tutors -- Pledge moves and High BP moves switched places in G7+ moves.AddRange(TypeTutor7.Where((t, i) => info.TypeTutors[i])); // No special tutors in G7