private static EncounterArea3 GetArea3(byte[] data) { var HaveGrassSlots = data[1] == 1; var HaveSurfSlots = data[2] == 1; var HaveRockSmashSlots = data[3] == 1; var HaveFishingSlots = data[4] == 1; int offset = 5; var slots = new List <EncounterSlot>(); if (HaveGrassSlots) { slots.AddRange(GetSlots3(data, ref offset, 12, SlotType.Grass)); } if (HaveSurfSlots) { slots.AddRange(GetSlots3(data, ref offset, 5, SlotType.Surf)); } if (HaveRockSmashSlots) { slots.AddRange(GetSlots3(data, ref offset, 5, SlotType.Rock_Smash)); } if (HaveFishingSlots) { slots.AddRange(GetSlots3Fishing(data, ref offset, 10)); } var area = new EncounterArea3 { Location = data[0], Slots = slots.ToArray() }; foreach (var slot in area.Slots) { slot.Area = area; } return(area); }
public EncounterSlot3Swarm(EncounterArea3 area, int species, int min, int max, int slot, IReadOnlyList <int> moves) : base(area, species, 0, min, max, slot, 0, 0, 0, 0) => Moves = moves;
private static EncounterArea3[] GetSwarm(string resource, string ident, GameVersion game) => EncounterArea3.GetAreasSwarm(ReadUnpack(resource, ident), game);
private static EncounterArea3[] GetRegular(string resource, string ident, GameVersion game) => EncounterArea3.GetAreas(Get(resource, ident), game);