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

        FromPB(pb);
        return(true);
    }
    //转化成Protobuffer类型函数
    public MMOMapDataInfoV1 ToPB()
    {
        MMOMapDataInfoV1 v = new MMOMapDataInfoV1();

        v.BaseInfo = m_BaseInfo.ToPB();
        for (int i = 0; i < (int)m_SpawnArr.Count; i++)
        {
            v.SpawnArr.Add(m_SpawnArr[i].ToPB());
        }
        for (int i = 0; i < (int)m_PortalArr.Count; i++)
        {
            v.PortalArr.Add(m_PortalArr[i].ToPB());
        }
        v.DefeatInfo = m_DefeatInfo.ToPB();
        for (int i = 0; i < (int)m_NodeArr.Count; i++)
        {
            v.NodeArr.Add(m_NodeArr[i].ToPB());
        }
        for (int i = 0; i < (int)m_PointArr.Count; i++)
        {
            v.PointArr.Add(m_PointArr[i].ToPB());
        }

        return(v);
    }
 //从Protobuffer类型初始化
 public void FromPB(MMOMapDataInfoV1 v)
 {
     if (v == null)
     {
         return;
     }
     m_BaseInfo.FromPB(v.BaseInfo);
     m_SpawnArr.Clear();
     for (int i = 0; i < v.SpawnArr.Count; i++)
     {
         m_SpawnArr.Add(new MMOMapDataSpawnInfoWraperV1());
     }
     for (int i = 0; i < v.SpawnArr.Count; i++)
     {
         m_SpawnArr[i].FromPB(v.SpawnArr[i]);
     }
     m_PortalArr.Clear();
     for (int i = 0; i < v.PortalArr.Count; i++)
     {
         m_PortalArr.Add(new MMOMapDataPortalInfoWraperV1());
     }
     for (int i = 0; i < v.PortalArr.Count; i++)
     {
         m_PortalArr[i].FromPB(v.PortalArr[i]);
     }
     m_DefeatInfo.FromPB(v.DefeatInfo);
     m_NodeArr.Clear();
     for (int i = 0; i < v.NodeArr.Count; i++)
     {
         m_NodeArr.Add(new MMOMapDataNodeInfoWraperV1());
     }
     for (int i = 0; i < v.NodeArr.Count; i++)
     {
         m_NodeArr[i].FromPB(v.NodeArr[i]);
     }
     m_PointArr.Clear();
     for (int i = 0; i < v.PointArr.Count; i++)
     {
         m_PointArr.Add(new MMOMapDataPointInfoWraperV1());
     }
     for (int i = 0; i < v.PointArr.Count; i++)
     {
         m_PointArr[i].FromPB(v.PointArr[i]);
     }
 }