Permit pokewalker courses for all languages

Wrong: #3594
Pokewalkers can interact with games they're not paired to (and receive gifts!).

Closes #3837
This commit is contained in:
Kurt 2023-03-19 12:21:43 -07:00
parent c8909a4326
commit ecbf6c06de
2 changed files with 0 additions and 15 deletions

View File

@ -199,11 +199,6 @@ private int GetEdgeCaseLanguage(PKM pk, int lang)
pk.OT_Name = "GF";
return (int)LanguageID.English;
// Some Pokewalker courses are only available in Japanese(/Korean) games.
case EncounterStatic4Pokewalker p when !p.IsCourseAvailable(lang):
pk.OT_Name = "ゲーフリ";
return (int)LanguageID.Japanese;
default:
return lang;
}

View File

@ -49,19 +49,9 @@ protected override bool IsMatchPartial(PKM pk)
{
if (pk.Ball != 4)
return true;
if (!IsCourseAvailable(pk.Language))
return true;
return base.IsMatchPartial(pk);
}
public bool IsCourseAvailable(int language) => Course switch
{
PokewalkerCourse4.Rally => language is (int)LanguageID.Japanese,
PokewalkerCourse4.Sightseeing => language is (int)LanguageID.Japanese or (int)LanguageID.Korean,
PokewalkerCourse4.AmityMeadow => language is (int)LanguageID.Japanese,
_ => true,
};
protected override void SetPINGA(PKM pk, EncounterCriteria criteria)
{
var pi = pk.PersonalInfo;