public static Goods_EquipPutProto GetProto(byte[] buffer) { Goods_EquipPutProto proto = new Goods_EquipPutProto(); MMO_MemoryStream ms = GameEntry.Socket.SocketReceiveMS; ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.Type = (byte)ms.ReadByte(); proto.GoodsId = ms.ReadInt(); proto.GoodsServerId = ms.ReadInt(); return(proto); }