///////////////////////////////////////////////////////////////////////////////// // Remove Friends ///////////////////////////////////////////////////////////////////////////////// void FriendRemoval() { try { //Read client packet data PacketReader reader = new PacketReader(PacketInformation.buffer); int target = reader.Int32(); reader.Close(); //Get player information Systems sys = GetPlayerid(target); //Remove friend from our list query MsSQL.UpdateData("DELETE FROM friends WHERE owner='" + Character.Information.CharacterID + "' AND friend_name='" + target + "'"); MsSQL.UpdateData("DELETE FROM friends WHERE owner='" + target + "' AND friend_name='" + Character.Information.CharacterID + "'"); //Remove friend from our list packet client.Send(Packet.FriendData(target, 3, "", Character, false)); client.Send(Packet.FriendRemovalTarget(target)); //Remove friend from friend id packet if (sys != null) { sys.Send(Packet.FriendData(sys.Character.Information.UniqueID, 3, "", Character, false)); } } catch (Exception ex) { Console.WriteLine("Friend removal error {0}", ex); Systems.Debugger.Write(ex); } }