コード例 #1
0
        public override void Serialize(IUnmanagedMemoryWriter writer)
        {
            base.Serialize(writer);
            writer.WriteInt16((short)Result);
            writer.WriteUInt16((ushort)Items.Count);

            foreach (var item in Items)
            {
                writer.WriteItem(item);
            }
        }
コード例 #2
0
 public override void Serialize(IUnmanagedMemoryWriter writer)
 {
     base.Serialize(writer);
     writer.WriteByte((byte)Friends.Count());
     foreach (var friend in Friends)
     {
         writer.WriteInt32(friend.Id);
         writer.WriteString(friend.Name, Encoding.Unicode, 12);
         writer.WriteByte(friend.Type);
         writer.WriteInt16(friend.ActiveServer);
     }
 }
コード例 #3
0
        public override void Serialize(IUnmanagedMemoryWriter writer)
        {
            base.Serialize(writer);
            writer.WriteByte((byte)GameServers.Count());

            foreach (var server in GameServers)
            {
                writer.WriteByte(server.UnknownByte);
                writer.WriteInt16(server.Id);
                writer.WriteByte((byte)server.Type);
                writer.WriteString(server.Host, Encoding.Unicode, 256);
                writer.WriteUInt16(server.Port);
                writer.WriteUInt16(server.OnlineCount);
                writer.WriteBoolean(server.ShowName);
                if (server.ShowName)
                {
                    writer.WriteString(server.Name, Encoding.Unicode, 64);
                }
            }
        }
コード例 #4
0
 public override void Serialize(IUnmanagedMemoryWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt16((short)(Failure ? -1 : 0));
     writer.WriteInt32(UnknownValue);
 }