Ejemplo n.º 1
0
        private static IEnumerable <EncounterSlot> GetSlots4HGSS_WFR(byte[] data, int ofs, int numslots, SlotType t)
        {
            var slots = new List <EncounterSlot>();

            for (int i = 0; i < numslots; i++)
            {
                // min, max, [16bit species]
                int Species = BitConverter.ToInt16(data, ofs + 2 + (i * 4));
                if (t == SlotType.Rock_Smash && Species <= 0)
                {
                    continue;
                }
                // fishing and surf slots with species = 0 are added too, it is needed for the swarm encounters,
                // it will be deleted after add swarm slots

                slots.Add(new EncounterSlot
                {
                    LevelMin   = data[ofs + 0 + (i * 4)],
                    LevelMax   = data[ofs + 1 + (i * 4)],
                    Species    = Species,
                    SlotNumber = i,
                    Type       = t
                });
            }
            EncounterUtil.MarkEncountersStaticMagnetPull(slots, PersonalTable.HGSS);
            return(slots);
        }
Ejemplo n.º 2
0
        private static IEnumerable <EncounterSlot> GetSlots4DPPt_WFR(byte[] data, int ofs, int numslots, SlotType t)
        {
            var slots = new List <EncounterSlot>();

            for (int i = 0; i < numslots; i++)
            {
                // max, min, unused, unused, [32bit species]
                int Species = BitConverter.ToInt32(data, ofs + 4 + (i * 8));
                if (Species <= 0)
                {
                    continue;
                }
                // fishing and surf slots with species = 0 are not added
                // DPPt does not have fishing or surf swarms
                slots.Add(new EncounterSlot
                {
                    LevelMax   = data[ofs + 0 + (i * 8)],
                    LevelMin   = data[ofs + 1 + (i * 8)],
                    Species    = Species,
                    SlotNumber = i,
                    Type       = t
                });
            }
            EncounterUtil.MarkEncountersStaticMagnetPull(slots, PersonalTable.HGSS);
            return(slots);
        }
Ejemplo n.º 3
0
 private static void MarkStaticMagnetPermute(IEnumerable <EncounterSlot> grp, List <EncounterSlot> trackPermute)
 {
     EncounterUtil.MarkEncountersStaticMagnetPullPermutation(grp, PersonalTable.HGSS, trackPermute);
 }