Beispiel #1
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fCommand = (Cmd)s.ReadInt();
            fString = s.ReadStdString();
        }
Beispiel #2
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fFlags = s.ReadByte();
            fNumFrames = s.ReadByte();
            fVoiceData = s.ReadStdString();

            fReceivers.Capacity = (int)s.ReadByte();
            for (int i = 0; i < fReceivers.Capacity; i++)
                fReceivers.Insert(i, s.ReadUInt());
        }
Beispiel #3
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fSynchFlags = (Flags)s.ReadInt();
            if (s.Version.IsPlasma21)
                fSynchFlags &= (Flags)~0x8;

            if (s.Version.IsPlasma21 && (((int)fSynchFlags & 0x06) != 0) ||
               (s.Version.IsPlasma20 && ExcludeStates)) {
                short count = s.ReadShort();
                for (short i = 0; i < count; i++)
                    fExcludeStates.Add((States)Enum.Parse(typeof(States), s.ReadStdString()));
            }

            //Plasma 2.1+ ends here...
            if (s.Version.IsPlasma21) {
                fSynchFlags = 0; // Synch Flags are pretty useless in Plasma21
                return;
            } else if (s.Version.IsPlasma20) {
                if (VolatileStates) {
                    short count = s.ReadShort();
                    for (short i = 0; i < count; i++)
                        fVolatileStates.Add((States)Enum.Parse(typeof(States), s.ReadStdString()));
                }
            }
        }
Beispiel #4
0
        public virtual void Read(hsStream s)
        {
            if (s.ReadByte() != kIoVersion)
                throw new NotSupportedException("Bad VarDescriptor IO Version");

            fName = s.ReadSafeString();
            string displayOptions = s.ReadStdString(); // TODO
            fCount = s.ReadInt();
            fType = (plAtomicType)s.ReadByte();
            Default = s.ReadSafeString();
            fFlags = (Flags)s.ReadInt();
        }
Beispiel #5
0
        public virtual void Read(hsStream s)
        {
            if (s.ReadByte() != kIoVersion)
                throw new NotSupportedException("Bad VarDescriptor IO Version");

            fName = s.ReadSafeString();
            string displayOptions = s.ReadStdString(); // TODO
            fCount = s.ReadInt();
            fType = (plAtomicType)s.ReadByte();
            Default = s.ReadSafeString();
            fFlags = (Flags)s.ReadInt();

            // Derived class in Cyan's code, but this is cleaner
            if (IsStateDesc) {
                fDescName = s.ReadSafeString();
                fVersion = (int)s.ReadShort();
            } else {
                fAtomicCount = (int)s.ReadShort();
                fAtomicType = (plAtomicType)s.ReadByte();
            }
        }
Beispiel #6
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            fFlags = (Flags)s.ReadShort();

            if (HasAccount)
                fAcctUUID = new Guid(s.ReadBytes(16));
            if (HasPlayerID)
                fPlayerID = s.ReadUInt();
            if (HasPlayerName)
                fPlayerName = s.ReadStdString();
            if (HasCCRLevel)
                fCCRLevel = s.ReadByte();
            if (HasProtectedLogin)
                fProtectedLogin = s.ReadBool();
            if (HasBuildType)
                fBuildType = s.ReadByte();
            if (HasSrcAddr)
                fSrcAddr = s.ReadUInt();
            if (HasSrcPort)
                fSrcPort = s.ReadUShort();
            if (HasReserved)
                fReserved = s.ReadUShort();
            if (HasClientKey)
                fClientKey = s.ReadStdString();
        }