コード例 #1
0
        private static void MarkSlotDetails(PKM pkm, EncounterSlot6AO slot, EvoCriteria evo)
        {
            if (slot.LevelMin > evo.MinLevel)
            {
                slot.WhiteFlute = true;
            }
            if (slot.LevelMax + 1 <= evo.MinLevel && evo.MinLevel <= slot.LevelMax + FluteBoostMax)
            {
                slot.BlackFlute = true;
            }

            if (!slot.CanDexNav)
            {
                return;
            }

            if (slot.LevelMax != evo.MinLevel)
            {
                slot.DexNav = true;
            }
            if (pkm.RelearnMove1 != 0 || pkm.AbilityNumber == 4)
            {
                slot.DexNav = true;
            }
        }
コード例 #2
0
        private EncounterSlot6AO[] ReadSlots(byte[] data)
        {
            const int size  = 4;
            int       count = (data.Length - 4) / size;
            var       slots = new EncounterSlot6AO[count];

            for (int i = 0; i < slots.Length; i++)
            {
                int    offset   = 4 + (size * i);
                ushort SpecForm = BitConverter.ToUInt16(data, offset);
                int    species  = SpecForm & 0x3FF;
                int    form     = SpecForm >> 11;
                int    min      = data[offset + 2];
                int    max      = data[offset + 3];
                slots[i] = new EncounterSlot6AO(this, species, form, min, max);
            }

            return(slots);
        }