public static Goods_SearchEquipDetailProto GetProto(byte[] buffer, bool isChild = false) { Goods_SearchEquipDetailProto proto = new Goods_SearchEquipDetailProto(); MMO_MemoryStream ms = null; if (!isChild) { ms = GameEntry.Socket.SocketSendMS; } else { ms = GameEntry.Pool.DequeueClassObject <MMO_MemoryStream>(); } ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.GoodsServerId = ms.ReadInt(); if (isChild) { GameEntry.Pool.EnqueueClassObject(ms); } return(proto); }
public static Goods_SearchEquipDetailProto GetProto(byte[] buffer) { Goods_SearchEquipDetailProto proto = new Goods_SearchEquipDetailProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.GoodsServerId = ms.ReadInt(); } return(proto); }
public static Goods_SearchEquipDetailProto GetProto(MMO_MemoryStream ms, byte[] buffer) { Goods_SearchEquipDetailProto proto = new Goods_SearchEquipDetailProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.GoodsServerId = ms.ReadInt(); return(proto); }