def __processBackClick(self, ctx=None):
     if self._previewBackCb:
         self._previewBackCb()
     elif self._backAlias == VIEW_ALIAS.LOBBY_RESEARCH:
         event_dispatcher.showResearchView(self._vehicleCD)
     elif self._backAlias == VIEW_ALIAS.VEHICLE_PREVIEW:
         entity = ctx.get('entity', None) if ctx else None
         if entity:
             descriptor = entity.typeDescriptor
             event_dispatcher.showVehiclePreview(
                 descriptor.type.compactDescr,
                 previewAlias=self._previousBackAlias)
         else:
             event_dispatcher.showHangar()
     elif self._backAlias == VIEW_ALIAS.LOBBY_STORE:
         if isIngameShopEnabled():
             showWebShop(url=getBuyVehiclesUrl())
         else:
             showOldShop(
                 ctx={
                     'tabId': STORE_TYPES.SHOP,
                     'component': STORE_CONSTANTS.VEHICLE
                 })
     else:
         event = g_entitiesFactories.makeLoadEvent(self._backAlias,
                                                   {'isBackEvent': True})
         self.fireEvent(event, scope=EVENT_BUS_SCOPE.LOBBY)
     return
Example #2
0
 def navigateToStore(self):
     if isIngameShopEnabled():
         showWebShop(getBuyVehiclesUrl())
     else:
         showOldShop(ctx={
             'tabId': STORE_TYPES.SHOP,
             'component': STORE_CONSTANTS.VEHICLE
         })
Example #3
0
 def onOpenShop(self):
     if isIngameShopEnabled():
         url = getBonsUrl()
         showWebShop(url)
     else:
         showOldShop(
             ctx={
                 'tabId': STORE_CONSTANTS.SHOP,
                 'component': STORE_CONSTANTS.BATTLE_BOOSTER
             })
     self.destroy()
Example #4
0
 def restoreTank(self):
     serverSettings = self.lobbyContext.getServerSettings()
     storageEnabled = serverSettings.isIngameStorageEnabled()
     shopEnabled = isIngameShopEnabled()
     if storageEnabled and shopEnabled:
         showStorage(STORAGE_CONSTANTS.IN_HANGAR,
                     STORAGE_CONSTANTS.VEHICLES_TAB_RESTORE)
     else:
         ctx = {
             'tabId': STORE_TYPES.SHOP,
             'component': STORE_CONSTANTS.RESTORE_VEHICLE
         }
         showOldShop(ctx=ctx)
 def openShop(self, cmd):
     if isIngameShopEnabled():
         event_dispatcher.showWebShop(url=None, customPath=cmd.path)
     else:
         event_dispatcher.showOldShop()
     return