當前位置: 首頁>>代碼示例>>C#>>正文


C# hsStream.WriteInt方法代碼示例

本文整理匯總了C#中Plasma.hsStream.WriteInt方法的典型用法代碼示例。如果您正苦於以下問題:C# hsStream.WriteInt方法的具體用法?C# hsStream.WriteInt怎麽用?C# hsStream.WriteInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Plasma.hsStream的用法示例。


在下文中一共展示了hsStream.WriteInt方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            s.WriteInt(fInvisLevel);
            s.WriteBool(fLeavingAge);
            mgr.WriteKey(s, fLinkKey);
            s.WriteInt(fEffects);
            mgr.WriteKey(s, fLinkAnimKey);
        }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:10,代碼來源:LinkEffectsTriggerMsg.cs

示例2: Write

 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);
     }
 }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:14,代碼來源:Vault2Cli.cs

示例3: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            s.WriteInt((int)fCommand);
            s.WriteStdString(fString);
        }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:7,代碼來源:ConsoleMsg.cs

示例4: Write

 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;
//.........這裏部分代碼省略.........
開發者ID:Hoikas,項目名稱:PlasmaDotNet,代碼行數:101,代碼來源:VaultNode.cs

示例5: Write

 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);
     }
 }
開發者ID:Hoikas,項目名稱:PlasmaDotNet,代碼行數:12,代碼來源:Auth2Cli.cs

示例6: IWrite

 protected override void IWrite(hsStream s, hsResMgr mgr)
 {
     mgr.WriteKey(s, fOfferer);
     s.WriteInt(fTargetAge);
     s.WriteInt(fOfferee);
 }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:6,代碼來源:NotifyMsg.cs

示例7: Write

        public void Write(hsStream s, hsResMgr mgr)
        {
            if (this is proActivateEventData)
                s.WriteInt((int)EventType.Activate);
            else if (this is proBookEventData)
                s.WriteInt((int)EventType.Book);
            else if (this is proCallbackEventData)
                s.WriteInt((int)EventType.Callback);
            else if (this is proClickDragEventData)
                s.WriteInt((int)EventType.ClickDrag);
            else if (this is proClimbingBlockerHitEventData)
                s.WriteInt((int)EventType.ClimbingBlockerHit);
            else if (this is proCollisionEventData)
                s.WriteInt((int)EventType.Collision);
            else if (this is proContainedEventData)
                s.WriteInt((int)EventType.Contained);
            else if (this is proControlKeyEventData)
                s.WriteInt((int)EventType.ControlKey);
            else if (this is proCoopEventData)
                s.WriteInt((int)EventType.Coop);
            else if (this is proFacingEventData)
                s.WriteInt((int)EventType.Facing);
            else if (this is proMultiStageEventData)
                s.WriteInt((int)EventType.MultiStage);
            else if (this is proOfferLinkingBookEventData)
                s.WriteInt((int)EventType.OfferLinkingBook);
            else if (this is proPickedEventData)
                s.WriteInt((int)EventType.Picked);
            else if (this is proResponderStateEventData)
                s.WriteInt((int)EventType.ResponderState);
            else if (this is proSpawnedEventData)
                s.WriteInt((int)EventType.Spawned);
            else if (this is proVariableEventData)
                s.WriteInt((int)EventType.Variable);
            else
                s.WriteInt((int)EventType.None);

            IWrite(s, mgr);
        }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:39,代碼來源:NotifyMsg.cs

示例8: Write

 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     if (fPattern == null)
         s.WriteInt(0);
     else {
         byte[] buf = fPattern.ToArray();
         s.WriteInt(buf.Length);
         s.WriteBytes(buf);
     }
 }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:11,代碼來源:Cli2Auth.cs

示例9: WriteString

 /// <summary>
 /// Writes a UTF-16 string with an int32 size
 /// </summary>
 /// <param name="s">Stream to write to</param>
 /// <param name="data">String to write to the stream</param>
 public static void WriteString(hsStream s, string data)
 {
     byte[] str = Encoding.Unicode.GetBytes(data);
     s.WriteInt(str.Length + 2);
     s.WriteBytes(str);
     s.WriteUShort((ushort)0);
 }
開發者ID:Hoikas,項目名稱:PlasmaDotNet,代碼行數:12,代碼來源:NetStream.cs

示例10: Write

 public override void Write(hsStream s, hsResMgr mgr)
 {
     mgr.WriteKey(s, fSender);
     s.WriteInt(fReceivers.Count);
     for (int i = 0; i < fReceivers.Count; i++)
         mgr.WriteKey(s, fReceivers[i]);
     if (s.Version.IsPlasma20)
         s.WriteDouble(fTimeStamp);
     s.WriteInt((int)fBCastFlags);
 }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:10,代碼來源:Message.cs

示例11: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            // We're not going to compress the stream...
            // Hope this is okay!
            s.WriteInt(fBuffer.Length);
            s.WriteByte((byte)Compression.kNone);
            s.WriteInt(fBuffer.Length);
            s.WriteBytes(fBuffer);
        }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:11,代碼來源:NetMsgStream.cs

示例12: VariableLengthWrite

 internal static void VariableLengthWrite(hsStream s, int size, int value)
 {
     if (size < 0x100)
         s.WriteByte((byte)value);
     else if (size < 0x10000)
         s.WriteShort((short)value);
     else
         s.WriteInt(value);
 }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:9,代碼來源:SDLMgr.cs

示例13: Write

        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());
        }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:20,代碼來源:NetMessage.cs

示例14: Write

 public override void Write(hsStream s)
 {
     s.WriteUInt(fTransID);
     s.WriteUInt(fNodeID);
     pnHelpers.WriteUuid(s, fRevision);
     if (fNode == null)
         s.WriteInt(0);
     else {
         byte[] buf = fNode.ToArray();
         s.WriteInt(buf.Length);
         s.WriteBytes(buf);
     }
 }
開發者ID:Hoikas,項目名稱:PlasmaDotNet,代碼行數:13,代碼來源:Cli2Auth.cs


注:本文中的Plasma.hsStream.WriteInt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。