Fix Master Rank Ribbon (#2874)

This commit is contained in:
Chris 2020-06-20 06:20:19 +02:00 committed by GitHub
parent 6002dfb739
commit 63add7d929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,14 +395,20 @@ private static bool CanParticipateInRankedSWSH(PKM pkm)
// Clamp to permitted species
var spec = pkm.Species;
if (638 <= spec && spec <= 640)
return true; // Sub Legends
if (722 <= spec && spec <= 730)
return true; // Gen7 starters
var pi = (PersonalInfoSWSH)PersonalTable.SWSH[spec];
var galarDex = pi.PokeDexIndex;
if (0 == galarDex || galarDex > 210)
return false;
var armorDex = pi.ArmorDexIndex;
if (1 <= galarDex && galarDex <= 397)
return true;
if (1 <= armorDex && armorDex <= 210)
return true;
return true;
return false;
}
private static IEnumerable<RibbonResult> GetInvalidRibbonsEvent1(PKM pkm, object encounterContent)