Ejemplo n.º 1
0
 protected override void OnTarget(Mobile from, object targ)
 {
     if (!(targ is PlayerMobile))
     {
         from.SendMessage(133, "You need to target a player.");
     }
     else if ((Mobile)targ == from)
     {
         from.SendMessage(133, "You can't target yourself.");
     }
     else
     {
         if (FriendSystem.AddFriend(from, (Mobile)targ))
         {
             from.SendMessage(133, "You've added {0} to your friends. He/she will show on your friend list when he/she added you.", ((Mobile)targ).Name);
             ((Mobile)targ).SendMessage(133, "{0} added you to his/her friends. You can add him/her to by typing [FriendList.", from.Name);
         }
         else
         {
             from.SendMessage(133, "This player is already on your friends list");
         }
     }
     from.SendGump(new FriendListGump(from));
 }