Exemple #1
0
        protected HeroType(OmegaStream stream)
        {
            this.Type = (HeroTypes)stream.ReadByte();
            switch (this.Type)
            {
            case HeroTypes.Enum:
            case HeroTypes.Class:
            case HeroTypes.NodeRef:
                this.Id = new DefinitionId(stream.ReadULong());
                return;

            case HeroTypes.String:
                break;

            case HeroTypes.List:
                this.Values = new HeroType(stream);
                return;

            case HeroTypes.LookupList:
                this.Indexer = new HeroType(stream);
                this.Values  = new HeroType(stream);
                break;

            default:
                return;
            }
        }
Exemple #2
0
        public void LoadBucket(Stream stream)
        {
            OmegaStream omegaStream = new OmegaStream(stream);

            omegaStream.CheckResourceHeader(1263878736U, (ushort)2, (ushort)2);
            for (int index = 0; index < 2; ++index)
            {
                uint length = omegaStream.ReadUInt();
                this.Parse((Stream) new MemoryStream(omegaStream.ReadBytes(length)));
            }
        }
Exemple #3
0
        public void LoadBucket(Stream stream)
        {
            OmegaStream stream2 = new OmegaStream(stream);

            stream2.CheckResourceHeader(0x4b554250, 2, 2);
            for (int i = 0; i < 2; i++)
            {
                uint   length = stream2.ReadUInt();
                byte[] buffer = stream2.ReadBytes(length);
                this.Parse(new MemoryStream(buffer));
            }
        }