Exemplo n.º 1
0
        public GDItem[] Weapon2 = new GDItem[2];    // Equipped items in weapon slots 2

        public void Read(GDCryptoDataBuffer reader)
        {
            byte useAlternate = reader.ReadCryptoByteUnchecked();

            for (int i = 0; i < Equipment.Length; i = i + 1)
            {
                GDItem item = new GDItem(GDItem.GDItemType.EQUIPPED);
                item.Read(reader);
                Equipment[i] = item;
            }

            byte alternate1 = reader.ReadCryptoByteUnchecked();

            for (int i = 0; i < Weapon1.Length; i = i + 1)
            {
                GDItem item = new GDItem(GDItem.GDItemType.EQUIPPED);
                item.Read(reader);
                Weapon1[i] = item;
            }

            byte alternate2 = reader.ReadCryptoByteUnchecked();

            for (int i = 0; i < Weapon2.Length; i = i + 1)
            {
                GDItem item = new GDItem(GDItem.GDItemType.EQUIPPED);
                item.Read(reader);

                Weapon2[i] = item;
            }
        }
Exemplo n.º 2
0
        private void AddRecords(List <string> regulars, List <string> greens, GDItem item)
        {
            if (!string.IsNullOrEmpty(item.PrefixRecord) || !string.IsNullOrEmpty(item.SuffixRecord))
            {
                greens.Add(item.PrefixRecord);
                greens.Add(item.BaseRecord);
                greens.Add(item.SuffixRecord);
                greens.Add(item.ComponentRecord);
                greens.Add(item.AugmentRecord);
            }
            else
            {
                regulars.Add(item.BaseRecord);

                if (!string.IsNullOrEmpty(item.ComponentRecord))
                {
                    regulars.Add(item.ComponentRecord);
                }

                if (!string.IsNullOrEmpty(item.AugmentRecord))
                {
                    regulars.Add(item.AugmentRecord);
                }
            }
        }
Exemplo n.º 3
0
        public void Read(GDCryptoDataBuffer reader)
        {
            reader.ReadBlockStart(BLOCK);

            reader.ReadCryptoByteUnchecked();


            int numItems = reader.ReadCryptoIntUnchecked();

            for (int i = 0; i < numItems; i = i + 1)
            {
                GDItem item = new GDItem(GDItem.GDItemType.INVENTORY);
                item.Read(reader);
            }

            reader.ReadBlockEnd();
        }
Exemplo n.º 4
0
        public void Read(GDCryptoDataBuffer reader)
        {
            reader.ReadBlockStart(BLOCK);

            int version = reader.ReadCryptoIntUnchecked();

            if (version != VERSION)
            {
                throw new FormatException("ERR_UNSUPPORTED_VERSION");
            }

            int width    = reader.ReadCryptoIntUnchecked();
            int height   = reader.ReadCryptoIntUnchecked();
            int numItems = reader.ReadCryptoIntUnchecked();

            for (int i = 0; i < numItems; i++)
            {
                var item = new GDItem(GDItem.GDItemType.STASH_CHAR);
                item.Read(reader);
            }
            reader.ReadBlockEnd();
        }