Exemple #1
0
    //Protobuffer从MemoryStream进行反序列化
    public bool FromMemoryStream(MemoryStream protoMS)
    {
        DungeonRpcOpenNotify pb = ProtoBuf.Serializer.Deserialize <DungeonRpcOpenNotify>(protoMS);

        FromPB(pb);
        return(true);
    }
Exemple #2
0
 //从Protobuffer类型初始化
 public void FromPB(DungeonRpcOpenNotify v)
 {
     if (v == null)
     {
         return;
     }
     m_DungeonKey  = v.DungeonKey;
     m_Host        = v.Host;
     m_Port        = v.Port;
     m_DungeonId   = v.DungeonId;
     m_DungeonType = v.DungeonType;
     m_GuildId     = v.GuildId;
 }
Exemple #3
0
    //转化成Protobuffer类型函数
    public DungeonRpcOpenNotify ToPB()
    {
        DungeonRpcOpenNotify v = new DungeonRpcOpenNotify();

        v.DungeonKey  = m_DungeonKey;
        v.Host        = m_Host;
        v.Port        = m_Port;
        v.DungeonId   = m_DungeonId;
        v.DungeonType = m_DungeonType;
        v.GuildId     = m_GuildId;

        return(v);
    }