Exemplo n.º 1
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fAccount = pnHelpers.ReadString(s, 64);
     fHash = s.ReadBytes(20);
     fSrvChg = s.ReadUInt();
     fCliChg = s.ReadUInt();
 }
Exemplo n.º 2
0
 public void Read(hsStream s)
 {
     fType = (ENetProtocol)s.ReadByte();
     if (s.ReadUShort() != kHeaderSize)
         throw new NotSupportedException();
     fBuildID = s.ReadUInt();
     fBuildType = (EBuildType)s.ReadUInt();
     fBranchID = s.ReadUInt();
     fProductUuid = pnHelpers.ReadUuid(s);
 }
Exemplo n.º 3
0
        public static DateTime Read(hsStream s)
        {
            // Read in the data from the stream
            double secs = (double)s.ReadUInt();
            double micros = (double)s.ReadUInt();

            // Now construct a .NET DateTime
            DateTime dt = Epoch.AddSeconds(secs);
            dt.AddMilliseconds(micros / 100);
            return dt;
        }
Exemplo n.º 4
0
 public void Read(hsStream s)
 {
     fType = (ENetProtocol)s.ReadByte();
     if (s.ReadUShort() != kHeaderSize)
         throw new NotSupportedException();
     fBuildID = s.ReadUInt();
     fProtocolVer = s.ReadUInt();
     if (fProtocolVer < 50)
         fProtocolVer = 50; // <= 50 are the old "Build Type" values...
     fBranchID = s.ReadUInt();
     fProductUuid = pnHelpers.ReadUuid(s);
 }
Exemplo n.º 5
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());
        }
Exemplo n.º 6
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fResult = (ENetError)s.ReadInt();
     fAcctGuid = pnHelpers.ReadUuid(s);
     fPermissions = s.ReadInt();
     fAvatars = new pnVaultAvatarInfo[s.ReadInt()];
     for (int i = 0; i < fAvatars.Length; i++) {
         fAvatars[i] = new pnVaultAvatarInfo();
         fAvatars[i].Read(s);
     }
 }
Exemplo n.º 7
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fResult = (ENetError)s.ReadInt();
 }
Exemplo n.º 8
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fResult = (ENetError)s.ReadInt();
     fPlayerID = s.ReadUInt();
     fPlayerName = pnHelpers.ReadString(s, 40);
     fShape = pnHelpers.ReadString(s, 64);
 }
Exemplo n.º 9
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fPingTimeMs = s.ReadUInt();
     fPayload = s.ReadBytes(s.ReadInt());
 }
Exemplo n.º 10
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fResult = (ENetError)s.ReadInt();
     fNodeRefs = new pnVaultNodeRef[s.ReadInt()];
     for (int i = 0; i < fNodeRefs.Length; i++) {
         fNodeRefs[i] = new pnVaultNodeRef();
         fNodeRefs[i].Read(s);
     }
 }
Exemplo n.º 11
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fID = s.ReadUInt();
     fSerial = s.ReadUShort();
 }
Exemplo n.º 12
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fResult = (ENetError)s.ReadInt();
     fAcctGuid = pnHelpers.ReadUuid(s);
     fFlags = s.ReadUInt();
     fBillingType = s.ReadUInt();
     fDroidKey = new uint[4];
     for (int i = 0; i < fDroidKey.Length; i++)
         fDroidKey[i] = s.ReadUInt();
 }
Exemplo n.º 13
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
 }
Exemplo n.º 14
0
 public override void Read(hsStream s, hsResMgr mgr)
 {
     fFlags = s.ReadUInt();
     fClientGuid.Read(s, mgr);
     fAvatarUoid = mgr.ReadUoid(s);
 }
Exemplo n.º 15
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fResult = (ENetError)s.ReadInt();
     if (s.ReadInt() != 0) { // Vault Node buffer size
         fNode = new pnVaultNode();
         fNode.Read(s);
     }
 }
Exemplo n.º 16
0
 public override void Read(hsStream s)
 {
     fNodeID = s.ReadUInt();
     fRevision = pnHelpers.ReadUuid(s);
 }
Exemplo n.º 17
0
 public override void Read(hsStream s)
 {
     fParentID = s.ReadUInt();
     fChildID = s.ReadUInt();
     fSaverID = s.ReadUInt();
 }
Exemplo n.º 18
0
 public override void Read(hsStream s)
 {
     fChallenge = s.ReadUInt();
 }
Exemplo n.º 19
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fPlayerID = s.ReadUInt();
     fPlayerName = pnHelpers.ReadString(s, 40);
     fModel = pnHelpers.ReadString(s, 64);
     fExplorer = s.ReadUInt();
 }
Exemplo n.º 20
0
        public string fPlayerName; // Len 40

        #endregion Fields

        #region Methods

        public void Read(hsStream s)
        {
            fPlayerID = s.ReadUInt();
            fPlayerName = pnHelpers.ReadString(s, 40);
            fModel = pnHelpers.ReadString(s, 64);
        }
Exemplo n.º 21
0
        public void Read(hsStream s)
        {
            ContentsFlags contents = (ContentsFlags)s.ReadByte();
            fLocation.Read(s);
            if ((contents & ContentsFlags.kHasLoadMask) != 0)
                if (!s.Version.IsPlasma21) fLoadMask.Read(s);
            fClassType = plManagedType.Read(s);
            if (s.Version.IsUruLive || s.Version.IsPlasma21)
                fObjectID = s.ReadUInt();
            fObjectName = s.ReadSafeString();
            if (s.Version.IsPlasma20) {
                if ((contents & ContentsFlags.kHasCloneIDs) != 0) {
                    fCloneID = s.ReadUInt();
                    fClonePlayerID = s.ReadUInt();
                }
            }

            if ((contents & (ContentsFlags.kHasLoadMask | ContentsFlags.kHasLoadMask2)) != 0)
                if (s.Version.IsPlasma21)
                    fLoadMask.Read(s);
        }
Exemplo n.º 22
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fCloneKey = mgr.ReadKey(s);
            fRequestorKey = mgr.ReadKey(s);
            fOriginatingPlayerID = s.ReadUInt();
            fUserData = s.ReadUInt();
            fValidMsg = s.ReadBool();
            fIsLoading = s.ReadBool();

            plCreatable tMsg = mgr.ReadCreatable(s);
            if (tMsg is plMessage)
                fTriggerMsg = (plMessage)tMsg;
            else if (tMsg != null)
                plDebugLog.GetLog("ResManager").Warn(
                    String.Format("plLoadCloneMsg: TriggerMsg should be a plMessage, but we got a '{0}'",
                    plFactory.ClassName(tMsg)));
        }
Exemplo n.º 23
0
 public override void Read(hsStream s)
 {
     fPingTimeMs = s.ReadUInt();
 }
Exemplo n.º 24
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fHost = pnHelpers.ReadString(s, 24);
 }
Exemplo n.º 25
0
 public void Read(hsStream s)
 {
     fParent = s.ReadUInt();
     fChild = s.ReadUInt();
     fSaver = s.ReadUInt();
     s.ReadByte(); // "Seen" -- might as well be garbage
 }
Exemplo n.º 26
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            // Cache it.
            fVersion = mgr.Version;

            // Cyan stores these values, but we're just going to
            //     save the stream and have fun with it...
            fBuffer = new byte[s.ReadInt()];
            Compression type = (Compression)s.ReadByte();
            uint len = s.ReadUInt();

            if (type == Compression.kZlib) {
                short streamType = s.ReadShort();
                byte[] buf = s.ReadBytes((int)len - 2);

                // Create a zlib-compatible inflator
                // Note: incoming has no zlib header/footer
                //       System.IO.Compression sucks.
                Inflater zlib = new Inflater(true);
                zlib.Inflate(buf);

                Buffer.BlockCopy(BitConverter.GetBytes(streamType), 0, fBuffer, 0, 2);
                Buffer.BlockCopy(buf, 0, fBuffer, 2, buf.Length);
            } else
                fBuffer = s.ReadBytes((int)len);
        }
Exemplo n.º 27
0
 public void Read(hsStream s)
 {
     pnVaultNodeFields f = (pnVaultNodeFields)s.ReadULong();
     for (ulong bit = 1; bit != 0 && bit <= (ulong)f; bit <<= 1) {
         switch (f & (pnVaultNodeFields)bit) {
             case pnVaultNodeFields.Blob_1:
                 fBlob[0] = s.ReadBytes(s.ReadInt());
                 break;
             case pnVaultNodeFields.Blob_2:
                 fBlob[1] = s.ReadBytes(s.ReadInt());
                 break;
             case pnVaultNodeFields.CreateAgeName:
                 fCreateAgeName = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.CreateAgeUuid:
                 fCreateAgeGuid = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.CreateTime:
                 fCreateTime = plUnifiedTime.Epoch.AddSeconds((double)s.ReadInt());
                 break;
             case pnVaultNodeFields.CreatorIdx:
                 fCreatorID = s.ReadUInt();
                 break;
             case pnVaultNodeFields.CreatorUuid:
                 fCreatorGuid = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.Int32_1:
                 fInt32[0] = s.ReadInt();
                 break;
             case pnVaultNodeFields.Int32_2:
                 fInt32[1] = s.ReadInt();
                 break;
             case pnVaultNodeFields.Int32_3:
                 fInt32[2] = s.ReadInt();
                 break;
             case pnVaultNodeFields.Int32_4:
                 fInt32[3] = s.ReadInt();
                 break;
             case pnVaultNodeFields.IString64_1:
                 fIString64[0] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.IString64_2:
                 fIString64[1] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.ModifyTime:
                 fModifyTime = plUnifiedTime.Epoch.AddSeconds((double)s.ReadInt());
                 break;
             case pnVaultNodeFields.NodeIdx:
                 fNodeID = s.ReadUInt();
                 break;
             case pnVaultNodeFields.NodeType:
                 fNodeType = (ENodeType)s.ReadUInt();
                 break;
             case pnVaultNodeFields.String64_1:
                 fString64[0] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_2:
                 fString64[1] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_3:
                 fString64[2] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_4:
                 fString64[3] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_5:
                 fString64[4] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.String64_6:
                 fString64[5] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.Text_1:
                 fText[0] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.Text_2:
                 fText[1] = pnHelpers.ReadString(s);
                 break;
             case pnVaultNodeFields.UInt32_1:
                 fUInt32[0] = s.ReadUInt();
                 break;
             case pnVaultNodeFields.UInt32_2:
                 fUInt32[1] = s.ReadUInt();
                 break;
             case pnVaultNodeFields.UInt32_3:
                 fUInt32[2] = s.ReadUInt();
                 break;
             case pnVaultNodeFields.UInt32_4:
                 fUInt32[3] = s.ReadUInt();
                 break;
             case pnVaultNodeFields.Uuid_1:
                 fGuid[0] = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.Uuid_2:
                 fGuid[1] = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.Uuid_3:
                 fGuid[2] = pnHelpers.ReadUuid(s);
                 break;
             case pnVaultNodeFields.Uuid_4:
                 fGuid[3] = pnHelpers.ReadUuid(s);
                 break;
         }
     }
 }
Exemplo n.º 28
0
        public override void Read(hsStream s)
        {
            fTransID = s.ReadUInt();
            fResult = (ENetError)s.ReadInt();

            // I'm not eap, so just embed the vault node into the stream
            // Forget crazy buffer hacks.
            if (s.ReadBool()) {
                fNode = new pnVaultNode();
                fNode.Read(s);
            }
        }
Exemplo n.º 29
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            fFlags = (BitVectorFlags)s.ReadInt();

            if (HasVersion) {
                fVerMajor = s.ReadByte();
                fVerMinor = s.ReadByte();
            }

            if (HasTimeSent)
                fTimeSent = plUnifiedTime.Read(s);
            if (HasContext)
                fContext = s.ReadUInt();
            if (HasTransID)
                fTransID = s.ReadUInt();
            if (HasPlayerID)
                fPlayerID = s.ReadUInt();
            if (HasAccount)
                fAcctUUID = new Guid(s.ReadBytes(16));
        }
Exemplo n.º 30
0
 public override void Read(hsStream s)
 {
     fTransID = s.ReadUInt();
     fResult = (ENetError)s.ReadInt();
     fNodeIDs = new uint[s.ReadInt()];
     for (int i = 0; i < fNodeIDs.Length; i++)
         fNodeIDs[i] = s.ReadUInt();
 }