def _populate(self):
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.SORTIE)
     self.addListener(events.HideWindowEvent.HIDE_UNIT_WINDOW, self.__handleUnitWindowHide, scope=EVENT_BUS_SCOPE.LOBBY)
     self.addListener(events.RenameWindowEvent.RENAME_WINDOW, self.__handleWindowRename, scope=EVENT_BUS_SCOPE.LOBBY)
     super(StrongholdBattleRoomWindow, self)._populate()
     self.prbEntity.initEvents(self)
     g_eventDispatcher.hideUnitProgressInCarousel(self.getPrbType())
 def _doSelect(self, dispatcher):
     if self.__funRandomCtrl.getCurrentSeason(
     ) is None and self.__funRandomCtrl.getNextSeason() is not None:
         event_dispatcher.showFunRandomInfoPage()
     elif self.__funRandomCtrl.isAvailable():
         isSuccess = yield dispatcher.doSelectAction(PrbAction(self._data))
         if isSuccess:
             selectorUtils.setBattleTypeAsKnown(self._selectorType)
     return
Exemplo n.º 3
0
 def select(self):
     if not self.rankedController.hasSuitableVehicles():
         g_eventDispatcher.loadRankedUnreachable()
     else:
         if self.rankedController.isAvailable():
             super(_RankedItem, self).select()
         elif self.__hasPastSeason:
             self.rankedController.openWebLeaguePage()
         selectorUtils.setBattleTypeAsKnown(self._selectorType)
 def _doSelect(self, dispatcher):
     if self.__eventProgression.getCurrentSeason(
     ) is not None or self.__eventProgression.getNextSeason() is not None:
         isSuccess = yield dispatcher.doSelectAction(PrbAction(self._data))
         if isSuccess and self._isNew:
             selectorUtils.setBattleTypeAsKnown(self._selectorType)
         else:
             return
     self.__eventProgression.openURL()
     return
Exemplo n.º 5
0
 def __onClose(self):
     self.destroyWindow()
     if not SelectorBattleTypesUtils.isKnownBattleType(SELECTOR_BATTLE_TYPES.MAPBOX):
         SelectorBattleTypesUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.MAPBOX)
     if self.__closeCallback is not None:
         self.__closeCallback()
     elif not self.__mapboxCtrl.isActive():
         showModeSelectorWindow(False)
     else:
         showMissionsMapboxProgression()
     return
 def __init__(self, ctx = None):
     super(HistoricalBattlesListWindow, self).__init__()
     self.selectedBattleID = self.preQueueFunctional.getSetting(PREQUEUE_SETTING_NAME.BATTLE_ID, -1)
     defaultVehicleID = -1
     if g_currentVehicle.isPresent():
         defaultVehicleID = g_currentVehicle.item.intCD
     self.selectedVehicleID = defaultVehicleID
     self.priceIndex, _ = self.preQueueFunctional.getSelectedPrice(self.selectedBattleID, self.selectedVehicleID)
     self.startCooldownCBID = None
     self.cooldownUpdateCBID = None
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.HISTORICAL)
 def __init__(self, ctx = None):
     super(HistoricalBattlesListWindow, self).__init__()
     self.selectedBattleID = self.preQueueFunctional.getSetting(PREQUEUE_SETTING_NAME.BATTLE_ID, -1)
     defaultVehicleID = -1
     if g_currentVehicle.isPresent():
         defaultVehicleID = g_currentVehicle.item.intCD
     self.selectedVehicleID = defaultVehicleID
     self.priceIndex, _ = self.preQueueFunctional.getSelectedPrice(self.selectedBattleID, self.selectedVehicleID)
     self.startCooldownCBID = None
     self.cooldownUpdateCBID = None
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.HISTORICAL)
     return
Exemplo n.º 8
0
 def _populate(self):
     super(FortBattleRoomWindow, self)._populate()
     from gui.shared.utils import SelectorBattleTypesUtils as selectorUtils
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.SORTIE)
     self.addListener(events.HideWindowEvent.HIDE_UNIT_WINDOW,
                      self.__handleUnitWindowHide,
                      scope=EVENT_BUS_SCOPE.LOBBY)
     self.addListener(FortEvent.CHOICE_DIVISION,
                      self.__onDivisionSet,
                      scope=EVENT_BUS_SCOPE.LOBBY)
     self.prbEntity.initEvents(self)
     g_eventDispatcher.hideUnitProgressInCarousel(self.getPrbType())
     self.startFortListening()
Exemplo n.º 9
0
 def _populate(self):
     super(FortBattleRoomWindow, self)._populate()
     from gui.shared.utils import SelectorBattleTypesUtils as selectorUtils
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.SORTIE)
     self.addListener(events.HideWindowEvent.HIDE_UNIT_WINDOW, self.__handleUnitWindowHide, scope=EVENT_BUS_SCOPE.LOBBY)
     self.addListener(FortEvent.CHOICE_DIVISION, self.__onLoadStart, scope=EVENT_BUS_SCOPE.LOBBY)
     unitMgrID = self.unitFunctional.getID()
     if unitMgrID > 0:
         self.__loadRoomView()
     else:
         self.__initIntroView()
     self.unitFunctional.initEvents(self)
     g_eventDispatcher.hideUnitProgressInCarousel(PREBATTLE_TYPE.SORTIE)
 def select(self):
     if self.rankedController.isAvailable():
         super(_RankedItem, self).select()
     elif self.__hasPastSeason:
         ctx = {
             'selectedItemID': RANKEDBATTLES_CONSTS.RANKED_BATTLES_RANKS_ID
         }
         if self.rankedController.isYearLBEnabled(
         ) and self.rankedController.isYearGap():
             ctx = {
                 'selectedItemID':
                 RANKEDBATTLES_CONSTS.RANKED_BATTLES_YEAR_RATING_ID
             }
         self.rankedController.showRankedBattlePage(ctx)
     selectorUtils.setBattleTypeAsKnown(self._selectorType)
 def _doSelect(self, dispatcher):
     currentSeason = self.__epicController.getCurrentSeason()
     isEventActive = False
     if currentSeason is not None:
         isActiveCycle = self.__epicController.getCurrentCycleInfo()[1]
         nextCycle = currentSeason.getNextByTimeCycle(
             time_utils.getCurrentLocalServerTimestamp())
         if isActiveCycle or nextCycle:
             isEventActive = True
             yield dispatcher.doSelectAction(PrbAction(self._data))
     if self._isNew or not isEventActive:
         self.__epicController.openURL()
         if self._isNew:
             selectorUtils.setBattleTypeAsKnown(self._selectorType)
     return
Exemplo n.º 12
0
 def _doSelect(self, dispatcher):
     currentSeason = self.__battleRoyaleController.getCurrentSeason()
     if currentSeason is not None:
         isActiveCycle = self.__battleRoyaleController.getCurrentCycleInfo(
         )[1]
         nextCycle = currentSeason.getNextByTimeCycle(
             time_utils.getCurrentLocalServerTimestamp())
         if isActiveCycle or nextCycle:
             self.__battleRoyaleController.setDefaultHangarEntryPoint()
             isSuccess = yield dispatcher.doSelectAction(
                 PrbAction(self._data))
             if isSuccess and self._isNew:
                 selectorUtils.setBattleTypeAsKnown(self._selectorType)
             else:
                 return
     self.__battleRoyaleController.openURL()
     return
Exemplo n.º 13
0
 def _populate(self):
     super(FortBattleRoomWindow, self)._populate()
     from gui.shared.utils import SelectorBattleTypesUtils as selectorUtils
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.SORTIE)
     self.addListener(events.HideWindowEvent.HIDE_UNIT_WINDOW,
                      self.__handleUnitWindowHide,
                      scope=EVENT_BUS_SCOPE.LOBBY)
     self.addListener(FortEvent.CHOICE_DIVISION,
                      self.__onLoadStart,
                      scope=EVENT_BUS_SCOPE.LOBBY)
     unitMgrID = self.unitFunctional.getID()
     if unitMgrID > 0:
         self.__loadRoomView()
     else:
         self.__initIntroView()
     self.unitFunctional.initEvents(self)
     g_eventDispatcher.hideUnitProgressInCarousel(PREBATTLE_TYPE.SORTIE)
     self.startFortListening()
Exemplo n.º 14
0
 def __init__(self, _ = None):
     super(CyberSportMainWindow, self).__init__()
     self.__currentState = ''
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.UNIT)
 def __onClick(self):
     self.__rankedController.doActionOnEntryPointClick()
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.RANKED)
Exemplo n.º 16
0
 def __init__(self, _ = None):
     super(CyberSportMainWindow, self).__init__()
     self.currentState = ''
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.UNIT)
 def select(self):
     if self.rankedController.isAvailable():
         super(_RankedItem, self).select()
     elif self.__hasPastSeason:
         self.rankedController.openWebLeaguePage()
     selectorUtils.setBattleTypeAsKnown(self._selectorType)
 def __onClick(self):
     self.__funRandomCtrl.selectFunRandomBattle()
     selectorUtils.setBattleTypeAsKnown(SELECTOR_BATTLE_TYPES.FUN_RANDOM)
 def _doSelect(self, dispatcher):
     isSuccess = yield dispatcher.doSelectAction(PrbAction(self._data))
     if isSuccess and self._isNew:
         selectorUtils.setBattleTypeAsKnown(self._selectorType)
 def _doSelect(self, dispatcher):
     isSuccess = yield dispatcher.doSelectAction(PrbAction(self.getData()))
     if isSuccess:
         if self._isNew:
             selectorUtils.setBattleTypeAsKnown(self._selectorType)
         self.mapsTrainingController.showMapsTrainingPage()
 def select(self):
     self.rankedController.doActionOnEntryPointClick()
     selectorUtils.setBattleTypeAsKnown(self._selectorType)
 def select(self):
     super(_EpicTrainingItem, self).select()
     selectorUtils.setBattleTypeAsKnown(self._selectorType)