Пример #1
0
    def __init__(self, args, dev_id, origin, last_known_state, communicator: AbstractCommunicator,
                 mapping_manager: MappingManager,
                 area_id: int, routemanager_name: str, db_wrapper, mitm_mapper: MitmMapper,
                 pogoWindowManager: PogoWindows,
                 NoOcr=False, walker=None, event=None):
        WorkerBase.__init__(self, args, dev_id, origin, last_known_state, communicator,
                            mapping_manager=mapping_manager, area_id=area_id,
                            routemanager_name=routemanager_name,
                            db_wrapper=db_wrapper, NoOcr=True,
                            pogoWindowManager=pogoWindowManager, walker=walker, event=event)

        self._reboot_count = 0
        self._restart_count = 0
        self._screendetection_count = 0
        self._rec_data_time = ""
        self._mitm_mapper = mitm_mapper
        self._latest_encounter_update = 0
        self._encounter_ids = {}
        self._current_sleep_time = 0
        self._db_wrapper.save_idle_status(dev_id, False)
        self._clear_quests_failcount = 0
        self._mitm_mapper.collect_location_stats(self._origin, self.current_location, 1, time.time(), 2, 0,
                                                 self._mapping_manager.routemanager_get_mode(
                                                     self._routemanager_name),
                                                 99)
Пример #2
0
 def _start_pogo(self) -> bool:
     pogo_topmost = self._communicator.is_pogo_topmost()
     if pogo_topmost:
         return True
     self._mitm_mapper.set_injection_status(self._origin, False)
     started_pogo: bool = WorkerBase._start_pogo(self)
     if not self._wait_for_injection() or self._stop_worker_event.is_set():
         raise InternalStopWorkerException
     else:
         return started_pogo