Exemple #1
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     pnHelpers.WriteString(s, fAccount, 64);
     s.WriteBytes(fHash);
     s.WriteUInt(fSrvChg);
     s.WriteUInt(fCliChg);
 }
Exemple #2
0
 public void Write(hsStream s)
 {
     s.WriteByte((byte)fType);
     s.WriteUShort(kHeaderSize);
     s.WriteUInt(fBuildID);
     s.WriteUInt((uint)fBuildType);
     s.WriteUInt(fBranchID);
     pnHelpers.WriteUuid(s, fProductUuid);
 }
Exemple #3
0
        public static void Write(hsStream s, DateTime dt)
        {
            // Figure out the Seconds and Microseconds from the DateTime
            TimeSpan ts = dt - Epoch;
            uint seconds = (uint)ts.TotalSeconds;
            uint micros = ((uint)(ts.TotalMilliseconds * 100.0d)) - seconds;

            // Now write them to the stream
            s.WriteUInt(seconds);
            s.WriteUInt(micros);
        }
Exemple #4
0
        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            s.WriteByte(fFlags);
            s.WriteByte(fNumFrames);
            s.WriteStdString(fVoiceData);

            s.WriteByte((byte)fReceivers.Count);
            foreach (uint r in fReceivers)
                s.WriteUInt(r);
        }
Exemple #5
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
     pnHelpers.WriteUuid(s, fAcctGuid);
     s.WriteInt(fPermissions);
     if (fAvatars == null)
         s.WriteInt(0);
     else {
         s.WriteInt(fAvatars.Length);
         foreach (pnVaultAvatarInfo a in fAvatars)
             a.Write(s);
     }
 }
Exemple #6
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
 }
Exemple #7
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
     s.WriteUInt(fPlayerID);
     pnHelpers.WriteString(s, fPlayerName, 40);
     pnHelpers.WriteString(s, fShape, 64);
 }
Exemple #8
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteUInt(fPingTimeMs);
     s.WriteInt(fPayload.Length);
     s.WriteBytes(fPayload);
 }
Exemple #9
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
     if (fNodeRefs == null)
         s.WriteInt(0);
     else {
         s.WriteInt(fNodeRefs.Length);
         foreach (pnVaultNodeRef r in fNodeRefs)
             r.Write(s);
     }
 }
Exemple #10
0
 protected override void IWrite(hsStream s, hsResMgr mgr)
 {
     s.WriteUInt(fEvent);
     s.WriteUInt(fLinkID);
 }
Exemple #11
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
     pnHelpers.WriteUuid(s, fAcctGuid);
     s.WriteUInt(fFlags);
     s.WriteUInt(fBillingType);
     if (fDroidKey == null) fDroidKey = new uint[4];
     for (int i = 0; i < fDroidKey.Length; i++)
         s.WriteUInt(fDroidKey[i]);
 }
Exemple #12
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
 }
 public override void Write(hsStream s, hsResMgr mgr)
 {
     s.WriteUInt(fFlags);
     fClientGuid.Write(s, mgr);
     mgr.WriteUoid(s, fAvatarUoid);
 }
Exemple #14
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
     if (fNodeIDs == null)
         s.WriteInt(0);
     else {
         s.WriteInt(fNodeIDs.Length);
         foreach (uint nodeID in fNodeIDs)
             s.WriteUInt(nodeID);
     }
 }
Exemple #15
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
     if (fNode == null)
         s.WriteInt(0);
     else {
         byte[] buf = fNode.ToArray();
         s.WriteInt(buf.Length);
         s.WriteBytes(buf);
     }
 }
Exemple #16
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fNodeID);
     pnHelpers.WriteUuid(s, fRevision);
 }
Exemple #17
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fParentID);
     s.WriteUInt(fChildID);
     s.WriteUInt(fSaverID);
 }
Exemple #18
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fChallenge);
 }
Exemple #19
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteUInt(fPlayerID);
     pnHelpers.WriteString(s, fPlayerName, 40);
     pnHelpers.WriteString(s, fModel, 64);
     s.WriteUInt(fExplorer);
 }
Exemple #20
0
 public void Write(hsStream s)
 {
     s.WriteUInt(fPlayerID);
     pnHelpers.WriteString(s, fPlayerName, 40);
     pnHelpers.WriteString(s, fModel, 64);
 }
Exemple #21
0
        public void Write(hsStream s)
        {
            ContentsFlags contents = IGetContentFlags(s.Version);
            s.WriteByte((byte)contents);
            fLocation.Write(s);
            if (s.Version.IsPlasma20)
                if ((contents & ContentsFlags.kHasLoadMask) != 0)
                    fLoadMask.Write(s);
            plManagedType.Write(s, fClassType);
            if (s.Version.IsUruLive || s.Version.IsPlasma21)
                s.WriteUInt(fObjectID.Value);
            s.WriteSafeString(fObjectName);
            if (s.Version.IsPlasma20)
                if ((contents & ContentsFlags.kHasCloneIDs) != 0) {
                    s.WriteUInt(fCloneID);
                    s.WriteUInt(fClonePlayerID);
                }

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

            mgr.WriteKey(s, fCloneKey);
            mgr.WriteKey(s, fRequestorKey);
            s.WriteUInt(fOriginatingPlayerID);
            s.WriteUInt(fUserData);
            s.WriteBool(fValidMsg);
            s.WriteBool(fIsLoading);
            mgr.WriteCreatable(s, fTriggerMsg);
        }
Exemple #23
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fPingTimeMs);
 }
Exemple #24
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     pnHelpers.WriteString(s, fHost, 24);
 }
Exemple #25
0
 public void Write(hsStream s)
 {
     s.WriteUInt(fParent);
     s.WriteUInt(fChild);
     s.WriteUInt(fSaver);
     s.WriteByte(0);
 }
Exemple #26
0
 protected override void IWrite(hsStream s, hsResMgr mgr)
 {
     s.WriteUInt(fID);
     s.WriteUShort(fSerial);
 }
Exemple #27
0
 public void Write(hsStream s)
 {
     pnVaultNodeFields f = Fields;
     s.WriteULong((ulong)f);
     for (ulong bit = 1; bit != 0 && bit <= (ulong)f; bit <<= 1) {
         switch (f & (pnVaultNodeFields)bit) {
             case pnVaultNodeFields.Blob_1:
                 s.WriteInt(fBlob[0].Length);
                 s.WriteBytes(fBlob[0]);
                 break;
             case pnVaultNodeFields.Blob_2:
                 s.WriteInt(fBlob[1].Length);
                 s.WriteBytes(fBlob[1]);
                 break;
             case pnVaultNodeFields.CreateAgeName:
                 pnHelpers.WriteString(s, fCreateAgeName);
                 break;
             case pnVaultNodeFields.CreateAgeUuid:
                 pnHelpers.WriteUuid(s, fCreateAgeGuid.Value);
                 break;
             case pnVaultNodeFields.CreateTime:
                 TimeSpan cts = fCreateTime.Value - plUnifiedTime.Epoch;
                 s.WriteUInt((uint)cts.Seconds);
                 break;
             case pnVaultNodeFields.CreatorIdx:
                 s.WriteUInt(fCreatorID.Value);
                 break;
             case pnVaultNodeFields.CreatorUuid:
                 pnHelpers.WriteUuid(s, fCreatorGuid.Value);
                 break;
             case pnVaultNodeFields.Int32_1:
                 s.WriteInt(fInt32[0].Value);
                 break;
             case pnVaultNodeFields.Int32_2:
                 s.WriteInt(fInt32[1].Value);
                 break;
             case pnVaultNodeFields.Int32_3:
                 s.WriteInt(fInt32[2].Value);
                 break;
             case pnVaultNodeFields.Int32_4:
                 s.WriteInt(fInt32[3].Value);
                 break;
             case pnVaultNodeFields.IString64_1:
                 pnHelpers.WriteString(s, fIString64[0]);
                 break;
             case pnVaultNodeFields.IString64_2:
                 pnHelpers.WriteString(s, fIString64[1]);
                 break;
             case pnVaultNodeFields.ModifyTime:
                 TimeSpan mts = fModifyTime.Value - plUnifiedTime.Epoch;
                 s.WriteUInt((uint)mts.Seconds);
                 break;
             case pnVaultNodeFields.NodeIdx:
                 s.WriteUInt(fNodeID.Value);
                 break;
             case pnVaultNodeFields.NodeType:
                 s.WriteUInt((uint)fNodeType);
                 break;
             case pnVaultNodeFields.String64_1:
                 pnHelpers.WriteString(s, fString64[0]);
                 break;
             case pnVaultNodeFields.String64_2:
                 pnHelpers.WriteString(s, fString64[1]);
                 break;
             case pnVaultNodeFields.String64_3:
                 pnHelpers.WriteString(s, fString64[2]);
                 break;
             case pnVaultNodeFields.String64_4:
                 pnHelpers.WriteString(s, fString64[3]);
                 break;
             case pnVaultNodeFields.String64_5:
                 pnHelpers.WriteString(s, fString64[4]);
                 break;
             case pnVaultNodeFields.String64_6:
                 pnHelpers.WriteString(s, fString64[5]);
                 break;
             case pnVaultNodeFields.Text_1:
                 pnHelpers.WriteString(s, fText[0]);
                 break;
             case pnVaultNodeFields.Text_2:
                 pnHelpers.WriteString(s, fText[1]);
                 break;
             case pnVaultNodeFields.UInt32_1:
                 s.WriteUInt(fUInt32[0].Value);
                 break;
             case pnVaultNodeFields.UInt32_2:
                 s.WriteUInt(fUInt32[1].Value);
                 break;
             case pnVaultNodeFields.UInt32_3:
                 s.WriteUInt(fUInt32[2].Value);
                 break;
             case pnVaultNodeFields.UInt32_4:
                 s.WriteUInt(fUInt32[3].Value);
                 break;
             case pnVaultNodeFields.Uuid_1:
                 pnHelpers.WriteUuid(s, fGuid[0].Value);
                 break;
             case pnVaultNodeFields.Uuid_2:
                 pnHelpers.WriteUuid(s, fGuid[1].Value);
                 break;
             case pnVaultNodeFields.Uuid_3:
                 pnHelpers.WriteUuid(s, fGuid[2].Value);
                 break;
             case pnVaultNodeFields.Uuid_4:
                 pnHelpers.WriteUuid(s, fGuid[3].Value);
                 break;
         }
     }
 }
Exemple #28
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
     s.WriteBool(fNode != null);
     if (fNode != null)
         fNode.Write(s);
 }
Exemple #29
0
        public override void Write(hsStream s, hsResMgr mgr)
        {
            s.WriteInt((int)fFlags);

            if (HasVersion) {
                s.WriteByte(fVerMajor);
                s.WriteByte(fVerMinor);
            }

            if (HasTimeSent)
                plUnifiedTime.Write(s, fTimeSent);
            if (HasContext)
                s.WriteUInt(fContext);
            if (HasTransID)
                s.WriteUInt(fTransID);
            if (HasPlayerID)
                s.WriteUInt(fPlayerID);
            if (HasAccount)
                s.WriteBytes(fAcctUUID.ToByteArray());
        }
Exemple #30
0
 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteInt((int)fResult);
     if (fNodeIDs == null)
         s.WriteInt(0);
     else {
         s.WriteInt(fNodeIDs.Length);
         for (int i = 0; i < fNodeIDs.Length; i++)
             s.WriteUInt(fNodeIDs[i]);
     }
 }