Ejemplo n.º 1
0
        public ShadowInfoTableXD(byte[] data)
        {
            Entries   = new List <ShadowInfoEntryXD>();
            MaxLength = data.Length;
            const int eSize  = ShadowInfoEntryXD.SIZE_ENTRY;
            int       eCount = data.Length / eSize;

            for (int i = 0; i < eCount; i++)
            {
                byte[] d = new byte[eSize];
                Array.Copy(data, i * eSize, d, 0, eSize);

                var entry = new ShadowInfoEntryXD(d);
                if (entry.Species != 0)
                {
                    Entries.Add(entry);
                }
            }
        }
Ejemplo n.º 2
0
        public void SetEntry(ShadowInfoEntryXD Entry)
        {
            var entry = GetEntry(Entry.Species, Entry.PID);

            if (entry.IsEmpty)
            {
                return;
            }

            int index = Array.FindIndex(Entries.ToArray(), ent => ent.Species == entry.Species);

            if (index > 0)
            {
                Entries[index] = entry;
            }
            else
            {
                Entries.Add(entry);
            }
        }
Ejemplo n.º 3
0
        public void SetEntry(ShadowInfoEntryXD Entry)
        {
            var entry = GetEntry(Entry.Species, Entry.PID);
            if (entry.IsEmpty)
                return;

            int index = Array.FindIndex(Entries.ToArray(), ent => ent.Species == entry.Species);
            if (index > 0)
                Entries[index] = entry;
            else
                Entries.Add(entry);
        }
Ejemplo n.º 4
0
        public ShadowInfoTableXD(byte[] data)
        {
            Entries = new List<ShadowInfoEntryXD>();
            MaxLength = data.Length;
            const int eSize = ShadowInfoEntryXD.SIZE_ENTRY;
            int eCount = data.Length/eSize;
            for (int i = 0; i < eCount; i++)
            {
                byte[] d = new byte[eSize];
                Array.Copy(data, i*eSize, d, 0, eSize);

                var entry = new ShadowInfoEntryXD(d);
                if (entry.Species != 0)
                    Entries.Add(entry);
            }
        }