Ejemplo n.º 1
0
        public bool GiftEquals(PGT pgt)
        {
            // Skip over the PGT's "Corresponding PCD Slot" @ 0x02
            byte[] g = pgt.Data;
            byte[] c = Gift.Data;
            if (g.Length != c.Length || g.Length < 3)
            {
                return(false);
            }
            for (int i = 0; i < 2; i++)
            {
                if (g[i] != c[i])
                {
                    return(false);
                }
            }
            for (int i = 3; i < g.Length; i++)
            {
                if (g[i] != c[i])
                {
                    return(false);
                }
            }

            return(true);
        }
Ejemplo n.º 2
0
Archivo: PGT.cs Proyecto: kwsch/PKHeX
        public PCD(byte[] data = null)
        {
            Data = (byte[])(data?.Clone() ?? new byte[Size]);

            byte[] giftData = new byte[PGT.Size];
            Array.Copy(Data, 0, giftData, 0, PGT.Size);
            Gift = new PGT(giftData);

            Information = new byte[Data.Length - PGT.Size];
            Array.Copy(Data, PGT.Size, Information, 0, Information.Length);
        }
Ejemplo n.º 3
0
        public PCD(byte[] data = null)
        {
            Data = (byte[])(data?.Clone() ?? new byte[Size]);

            byte[] giftData = new byte[PGT.Size];
            Array.Copy(Data, 0, giftData, 0, PGT.Size);
            Gift = new PGT(giftData);

            Information = new byte[Data.Length - PGT.Size];
            Array.Copy(Data, PGT.Size, Information, 0, Information.Length);
        }