Fix BCC if-else slot loading

Not all slots were being loaded.

Thanks jazpersona !
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=267494
This commit is contained in:
Kurt
2021-07-03 11:35:28 -07:00
parent 16c8a18928
commit 0e9d0886a9

View File

@@ -35,7 +35,7 @@ private EncounterArea2(byte[] data, GameVersion game) : base(game)
var type = (Type = (SlotType)data[2]) & (SlotType)0xF;
var rate = data[3];
if (type > SlotType.Surf) // Not Grass/Surf
if (type is > SlotType.Surf and not SlotType.BugContest) // Not Grass/Surf
{
const int size = 5;
int count = (data.Length - 4) / size;