Example #1
0
 public void Click(RadarForm form, MouseEventArgs e)
 {
     Point cursorPosition = form.PointToClient(Cursor.Position);
     var cursorRect = new Rectangle(cursorPosition.X, cursorPosition.Y, 5, 5);
     try
     {
         foreach (PGameObject node in ObjectManager.GetGameObject)
         {
             if (FindNode.IsHerb(node) || FindNode.IsMine(node))
             {
                 float x = form.OffsetX(node.Location.X, ObjectManager.MyPlayer.Location.X);
                 float y = form.OffsetY(node.Location.Y, ObjectManager.MyPlayer.Location.Y);
                 var objRect = new Rectangle((int) y, (int) x, 5, 5);
                 if (Rectangle.Intersect(objRect, cursorRect) != Rectangle.Empty)
                 {
                     if (FlyingBlackList.IsBlacklisted(node))
                     {
                         FlyingBlackList.Unblacklist(node);
                     }
                     else
                     {
                         Logging.Write("Added the node to the permanent blacklist");
                         FlyingBlackList.AddBadNode(node);
                     }
                 }
             }
         }
     }
     catch
     {
     }
 }