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


C# hsStream.WriteUShort方法代碼示例

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


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

示例1: Write

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

示例2: Write

 public override void Write(hsStream s, hsResMgr mgr)
 {
     base.Write(s, mgr);
     s.WriteUShort(fState);
 }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:5,代碼來源:InputMsg.cs

示例3: 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

示例4: IWrite

 protected override void IWrite(hsStream s, hsResMgr mgr)
 {
     s.WriteUInt(fID);
     s.WriteUShort(fSerial);
 }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:5,代碼來源:NotifyMsg.cs

示例5: Write

        public static void Write(hsStream s, plCreatableID data)
        {
            if (fTypeMaps == null)
                IBuildTypeMaps();

            plCreatableID type = (plCreatableID)data;
            ushort end = (ushort)plCreatableID.NULL;

            foreach (KeyValuePair<plTypeBounds, Type> kvp in fTypeMaps) {
                if (kvp.Key.UpperBoundary >= s.Version && s.Version >= kvp.Key.LowerBoundary) {
                    string value = Enum.GetName(typeof(plCreatableID), type);
                    end = (ushort)Enum.Parse(kvp.Value, value);
                }
            }

            //Note: We must adjust < PotS IDs...
            if (s.Version < plVersion.PathOfTheShell)
                if (end > (ushort)UruTypes.plAvatarSpawnNotifyMsg)
                    end--;
            //End type adjustment

            s.WriteUShort(end);
        }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:23,代碼來源:ManagedType.cs

示例6: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            s.WriteShort((short)fFlags);

            if (HasAccount)
                s.WriteBytes(fAcctUUID.ToByteArray());
            if (HasPlayerID)
                s.WriteUInt(fPlayerID);
            if (HasPlayerName)
                s.WriteStdString(fPlayerName);
            if (HasCCRLevel)
                s.WriteByte(fCCRLevel);
            if (HasProtectedLogin)
                s.WriteBool(fProtectedLogin);
            if (HasBuildType)
                s.WriteByte(fBuildType);
            if (HasSrcAddr)
                s.WriteUInt(fSrcAddr);
            if (HasSrcPort)
                s.WriteUShort(fSrcPort);
            if (HasReserved)
                s.WriteUShort(fReserved);
            if (HasClientKey)
                s.WriteStdString(fClientKey);
        }
開發者ID:branan,項目名稱:PlasmaDotNet,代碼行數:25,代碼來源:ClientGuid.cs


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