public static FriendAddInfo RecvFriendAdd(Packet p)
        {
            p.Skip(2);
            byte type = p.ReadByte();
            byte answer = p.ReadByte();
            int askerid = p.ReadInt();
            int targetid = p.ReadInt();

            FriendAddInfo i = new FriendAddInfo
            {
                Type = (FriendAddTypes)type,
                Answer = (FriendAddAnswers)answer,
                AskerID = askerid,
                TargetID = targetid
            };

            return i;
        }
 public ClientAddFriendEventArgs(FriendAddInfo i)
 {
     info = i;
 }
 public static byte[] SendAddFriend(FriendAddInfo info)
 {
     Packet p = new Packet(20);
     p.WriteByte((byte)info.Type);
     p.WriteByte((byte)info.Answer);
     p.WriteInt(info.AskerID);
     p.WriteInt(info.TargetID);
     return p.GetWrittenBuffer(PacketIds.SendAddFriend);
 }