Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 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)