Пример #1
0
    public byte   Grade;       //难度等级

    public byte[] ToArray()
    {
        using (MMoMemorySteam ms = new MMoMemorySteam())
        {
            ms.WriteUShort(ProtoCode);
            ms.WriteInt(GameLevelId);
            ms.WriteByte(Grade);
            return(ms.ToArray());
        }
    }
Пример #2
0
    public short  MessageId; //错误编号

    public byte[] ToArray()
    {
        using (MMoMemorySteam ms = new MMoMemorySteam())
        {
            ms.WriteUShort(ProtoCode);
            ms.WriteBool(IsSuccess);
            if (!IsSuccess)
            {
                ms.WriteShort(MessageId);
            }
            return(ms.ToArray());
        }
    }