///////////////////////////////////////////////////////////////////////////////// // Add new friend ///////////////////////////////////////////////////////////////////////////////// void FriendAdd() { try { PacketReader reader = new PacketReader(PacketInformation.buffer); short namelenght = reader.Int16(); string name = reader.String(namelenght); reader.Close(); if (name == Character.Information.Name) { return; } Systems sys = GetPlayerName(name); if (sys != null) { sys.client.Send(Packet.FriendInviteTarget(sys.Character)); } else { //Packet cannot find user } } catch (Exception ex) { Console.WriteLine("Friend Add error {0}", ex); Systems.Debugger.Write(ex); } }