Example #1
0
        public static void SendSlot(PokeSysBotMini psb, byte[] data, int box, int slot)
        {
            var slotofs      = psb.GetSlotOffset(box, slot);
            var StoredLength = psb.SlotSize - 0x1C;

            psb.com.WriteBytes(data.Slice(0, StoredLength), slotofs);
            psb.com.WriteBytes(data.AsSpan(StoredLength).ToArray(), slotofs + (ulong)StoredLength + 0x70);
        }
Example #2
0
        public static byte[] ReadSlot(PokeSysBotMini psb, int box, int slot)
        {
            var bytes        = psb.com.ReadBytes(psb.GetSlotOffset(box, slot), psb.SlotSize + psb.GapSize);
            var StoredLength = psb.SlotSize - 0x1C;
            var stored       = bytes.Slice(0, StoredLength);
            var party        = bytes.Slice(StoredLength + 0x70, 0x1C);

            return(ArrayUtil.ConcatAll(stored, party));
        }
Example #3
0
 public static void SendSlot(PokeSysBotMini psb, byte[] data, int box, int slot) => psb.com.WriteBytes(data, psb.GetSlotOffset(box, slot));
Example #4
0
 public static byte[] ReadSlot(PokeSysBotMini psb, int box, int slot) => psb.com.ReadBytes(psb.GetSlotOffset(box, slot), psb.SlotSize + psb.GapSize);