public void CheckUserForGift(GPlayer player, Packet packet)
        {
            var _db = new PangyaEntities();

            if (!packet.ReadByte(out byte Type))
            {
                player.SendResponse(new byte[] { 0xA1, 0x00, 0x02 });
                return;
            }
            try
            {
                switch (Type)
                {
                case 1:    //friend
                {
                    if (!packet.ReadPStr(out string UserName))
                    {
                        player.SendResponse(new byte[] { 0xA1, 0x00, 0x02 }); return;
                    }

                    var Query = _db.ProcCheckUsername(UserName).ToList();
                    if (Query.Count <= 0)
                    {
                        player.SendResponse(new byte[] { 0xA1, 0x00, 0x02 });
                    }
                    else
                    {
                        var data = Query.First();

                        player.SendResponse(ShowUserGift(data.UID, data.Username, data.Nickname));
                    }
                }
                break;

                case 0:    //no friend
                {
                    packet.ReadPStr(out string UserName);

                    var Query = _db.ProcCheckUsername(UserName).ToList();
                    if (Query.Count <= 0)
                    {
                        player.SendResponse(new byte[] { 0xA1, 0x00, 0x02 });
                        return;
                    }
                    else
                    {
                        var data = Query.First();

                        player.SendResponse(ShowUserGift(data.UID, data.Username, data.Nickname));
                    }
                }
                break;

                default:
                {
                    player.Response.Write(new byte[] { 0xA1, 0x00 });
                    player.Response.WriteByte(2);
                    player.SendResponse();
                }
                break;
                }
            }
            catch
            {
                player.Close();
            }
        }