protected void entrySelected(SearchEntry selectedEntry) {

    Region r = selectedEntry.region;

    try {

      Location loc = r.getCenter();
      guide.getRegion().hover(loc);
      // TODO: this will fail because it's an event dispatch thread and waitIdle can not
      // be called by click()
    } catch (FindFailed e) {
    } catch (Exception e) {
    }
  }
Ejemplo n.º 2
0
 public static boolean openVillage() throws SHKException {
   Consol.info("Opening village tab");
   Region r = SHK.R.TABS;
   try {
     if (r.click(CTRL_HUT1, 0) != 0) {
       return true;
     } else if (r.click(CTRL_HUT2, 0) != 0) {
       return true;
     } else {
       Consol.error("Village tab has not been found!");
       if (SHK.isConnectionError()) {
         throw new SHKConnectionErrorException("Cannot open marchant");
       }
     }
   } catch (FindFailed e) {
     Consol.error("Find failed for village tab!", e);
     throw new SHKException(e);
   }
   return false;
 }