public static FriendDecline ( string name ) : byte[] | ||
name | string | |
Результат | byte[] |
///////////////////////////////////////////////////////////////////////////////// // Friend add response ///////////////////////////////////////////////////////////////////////////////// void FriendAddResponse() { try { PacketReader reader = new PacketReader(PacketInformation.buffer); int Inviterid = reader.Int32(); int Myid = reader.Int32(); byte State = reader.Byte(); reader.Close(); Systems sys = GetPlayer(Inviterid); if (sys != null) { if (State == 0) { //Declined client.Send(Packet.FriendDecline(Character.Information.Name)); sys.client.Send(Packet.FriendDecline(Character.Information.Name)); } else { //Accepted sys.client.Send(Packet.FriendData(Myid, 2, Character.Information.Name, Character, false)); client.Send(Packet.FriendData(Inviterid, 2, sys.Character.Information.Name, sys.Character, false)); MsSQL.InsertData("INSERT INTO friends (owner,friend_name,model_info) VALUES ('" + Character.Information.CharacterID + "','" + sys.Character.Information.CharacterID + "','" + sys.Character.Information.Model + "')"); MsSQL.InsertData("INSERT INTO friends (owner,friend_name,model_info) VALUES ('" + sys.Character.Information.CharacterID + "','" + Character.Information.CharacterID + "','" + Character.Information.Model + "')"); } } } catch (Exception ex) { Console.WriteLine("Friend Add Response Error {0}", ex); Systems.Debugger.Write(ex); } }