Temp handling for bdsp case

This commit is contained in:
Kurt 2021-12-09 19:53:43 -08:00
parent f1fe2f6a8c
commit 2e20e75168

View file

@ -153,19 +153,35 @@ namespace PKHeX.Core
private static GameVersion GetIsTutor8(PKM pkm, int species, int form, bool specialTutors, int move)
{
var pi = (PersonalInfoSWSH)PersonalTable.SWSH.GetFormEntry(species, form);
var type = Array.IndexOf(TypeTutor8, move);
if (type != -1 && pi.TypeTutors[type])
return GameVersion.Gen8;
if (pkm.BDSP)
{
var pi = (PersonalInfoBDSP)PersonalTable.BDSP.GetFormEntry(species, form);
if (!pi.IsPresentInGame)
return NONE;
var type = Array.IndexOf(TypeTutor8b, move);
if (type != -1 && pi.TypeTutors[type])
return GameVersion.BDSP;
if (!specialTutors)
return NONE;
}
else
{
var pi = (PersonalInfoSWSH)PersonalTable.SWSH.GetFormEntry(species, form);
if (!pi.IsPresentInGame)
return NONE;
var type = Array.IndexOf(TypeTutor8, move);
if (type != -1 && pi.TypeTutors[type])
return GameVersion.SWSH;
var tutor = Array.IndexOf(Tutors_SWSH_1, move);
if (tutor != -1 && pi.SpecialTutors[0][tutor])
return GameVersion.USUM;
if (!specialTutors)
return NONE;
return NONE;
var tutor = Array.IndexOf(Tutors_SWSH_1, move);
if (tutor != -1 && pi.SpecialTutors[0][tutor])
return GameVersion.SWSH;
return NONE;
}
}
public static IEnumerable<int> GetTutorMoves(PKM pkm, int species, int form, bool specialTutors, int generation)