FriendInviteTarget() public static method

public static FriendInviteTarget ( character c ) : byte[]
c character
return byte[]
示例#1
0
文件: Friends.cs 项目: uvbs/DarkEmu
 /////////////////////////////////////////////////////////////////////////////////
 // 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);
     }
 }