Ejemplo n.º 1
0
 private void ScanImage(List <Monster> monsterList)
 {
     foreach (var monster in monsterList)
     {
         Bitmap bmp      = ImageSearch.PrintWindow((IntPtr)_ai.screenHandle);
         var    leftBmp  = ImageSearch.CropImage(bmp, new Point(0, 0), 720, 670);
         Point  location = Scan(leftBmp, monster.GetImagePath());
         if (location.X == -1 && location.Y == -1)
         {
             continue;
         }
         location.Y += monster.GetMonsterImagePositionOffsetY();
         location.X += 360;
         Bitmap crop = ImageSearch.CropImage(bmp, location, 185, 60);
         monster.MinutesToSpawn = OCR.ExtractTime(_OCR.RawOCR(crop));
         //_log.Info($"{monster.GetName()}: {monster.MinutesToSpawn} minutes");
     }
 }
Ejemplo n.º 2
0
 public ScanMini(AI ai, OCR ocr, Log log)
 {
     _ai  = ai;
     _OCR = ocr;
     _log = log;
 }