コード例 #1
0
ファイル: historical.py プロジェクト: Infernux/Projects
 def __checkAvailability(self):
     if not g_eventsCache.getHistoricalBattles():
         LOG_DEBUG('No historical battles available.')
         self.leave(pre_queue_ctx.LeavePreQueueCtx(waitingID='prebattle/leave'))
         return 
     historicalBattle = g_eventsCache.getHistoricalBattles().get(self._settings[PREQUEUE_SETTING_NAME.BATTLE_ID])
     if historicalBattle is None:
         LOG_DEBUG('Currently selected historical battle is no longer available.')
         self.leave(pre_queue_ctx.LeavePreQueueCtx(waitingID='prebattle/leave'))
     else:
         g_currentVehicle.setHistoricalBattle(historicalBattle)
コード例 #2
0
ファイル: historical.py プロジェクト: Infernux/Projects
 def fini(self, woEvents = False):
     self.__requestCtx = None
     if not woEvents:
         g_eventDispatcher.unloadHistoryBattles()
     else:
         g_eventDispatcher.removeHistoryBattlesFromCarousel()
     g_gameCtrl.captcha.onCaptchaInputCanceled -= self.onCaptchaInputCanceled
     g_eventBus.removeListener(events.ChannelCarouselEvent.CAROUSEL_INITED, self.__handleCarouselInited, scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventDispatcher.unloadHistoryBattles()
     g_eventsCache.onSyncCompleted -= self.onEventsCacheResync
     g_currentVehicle.setHistoricalBattle(None)
     super(HistoricalQueueFunctional, self).fini(woEvents=woEvents)
コード例 #3
0
ファイル: historical.py プロジェクト: jamesxia4/wot_client
 def fini(self, woEvents=False):
     self.__requestCtx = None
     if not woEvents:
         g_eventDispatcher.unloadHistoryBattles()
     else:
         g_eventDispatcher.removeHistoryBattlesFromCarousel()
     g_gameCtrl.captcha.onCaptchaInputCanceled -= self.onCaptchaInputCanceled
     g_eventBus.removeListener(events.ChannelCarouselEvent.CAROUSEL_INITED,
                               self.__handleCarouselInited,
                               scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventDispatcher.unloadHistoryBattles()
     g_eventsCache.onSyncCompleted -= self.onEventsCacheResync
     g_currentVehicle.setHistoricalBattle(None)
     super(HistoricalQueueFunctional, self).fini(woEvents=woEvents)
コード例 #4
0
ファイル: historical.py プロジェクト: jamesxia4/wot_client
 def __checkAvailability(self):
     if not g_eventsCache.getHistoricalBattles():
         LOG_DEBUG('No historical battles available.')
         self.leave(
             pre_queue_ctx.LeavePreQueueCtx(waitingID='prebattle/leave'))
         return
     historicalBattle = g_eventsCache.getHistoricalBattles().get(
         self._settings[PREQUEUE_SETTING_NAME.BATTLE_ID])
     if historicalBattle is None:
         LOG_DEBUG(
             'Currently selected historical battle is no longer available.')
         self.leave(
             pre_queue_ctx.LeavePreQueueCtx(waitingID='prebattle/leave'))
     else:
         g_currentVehicle.setHistoricalBattle(historicalBattle)
コード例 #5
0
ファイル: historical.py プロジェクト: webiumsk/WoT
 def _applySettings(self, settings):
     if PREQUEUE_SETTING_NAME.BATTLE_ID in settings:
         historicalBattle = g_eventsCache.getHistoricalBattles().get(settings[PREQUEUE_SETTING_NAME.BATTLE_ID])
         g_currentVehicle.setHistoricalBattle(historicalBattle)
コード例 #6
0
ファイル: historical.py プロジェクト: jamesxia4/wot_client
 def _applySettings(self, settings):
     if PREQUEUE_SETTING_NAME.BATTLE_ID in settings:
         historicalBattle = g_eventsCache.getHistoricalBattles().get(
             settings[PREQUEUE_SETTING_NAME.BATTLE_ID])
         g_currentVehicle.setHistoricalBattle(historicalBattle)