def loadPersonalMissionsView(self, event):
     settingsCore = dependency.instance(ISettingsCore)
     eventsCache = dependency.instance(IEventsCache)
     uiStorage = settingsCore.serverSettings.getUIStorage()
     goByDefault = True
     if not uiStorage.get(PM_TUTOR_FIELDS.GREETING_SCREEN_SHOWN):
         self.loadViewByCtxEvent(
             LoadViewEvent(
                 SFViewLoadParams(PERSONAL_MISSIONS_ALIASES.
                                  PERSONAL_MISSION_FIRST_ENTRY_VIEW_ALIAS),
                 ctx=event.ctx))
         goByDefault = False
     elif not uiStorage.get(PM_TUTOR_FIELDS.FIRST_ENTRY_AWARDS_SHOWN):
         if findFirst(
                 methodcaller('isAwardAchieved'),
                 eventsCache.getPersonalMissions().getAllOperations().
                 values()):
             self.loadViewByCtxEvent(
                 LoadViewEvent(SFViewLoadParams(
                     PERSONAL_MISSIONS_ALIASES.
                     PERSONAL_MISSION_FIRST_ENTRY_AWARD_VIEW_ALIAS),
                               ctx=event.ctx))
             goByDefault = False
         else:
             settingsCore.serverSettings.saveInUIStorage(
                 {PM_TUTOR_FIELDS.FIRST_ENTRY_AWARDS_SHOWN: True})
     if goByDefault:
         if event.alias == VIEW_ALIAS.LOBBY_PERSONAL_MISSIONS:
             self.loadViewByCtxEvent(
                 LoadViewEvent(
                     SFViewLoadParams(PERSONAL_MISSIONS_ALIASES.
                                      PERSONAL_MISSIONS_OPERATIONS),
                     ctx=event.ctx))
         else:
             self.loadViewByCtxEvent(event)
Beispiel #2
0
    def show(self, lessonID=None):
        view = self.getView()
        if not lessonID:
            g_eventBus.handleEvent(
                events.LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.WIKI_VIEW)),
                EVENT_BUS_SCOPE.LOBBY)
        else:
            for chapterIndex, chapter in enumerate(self.__getChapters()):
                pageIndex = next(
                    (pageIndex
                     for pageIndex, pageID in enumerate(chapter['pageIDs'])
                     if pageID == lessonID), None)
                if pageIndex is not None:
                    if view:
                        self.showChapterView(chapterIndex, pageIndex)
                    else:
                        ctx = {
                            'chapterIndex': chapterIndex,
                            'pageIndex': pageIndex
                        }
                        g_eventBus.handleEvent(
                            events.LoadViewEvent(
                                SFViewLoadParams(VIEW_ALIAS.WIKI_VIEW),
                                ctx=ctx), EVENT_BUS_SCOPE.LOBBY)
                    return

            _logger.debug('Cant found page to show lesson with id %d',
                          lessonID)
        return
    def _setHighlighting(self, highlightType, doHighlight):
        eventId = VIEW_ALIAS.BOOTCAMP_ADD_HIGHLIGHT if doHighlight else VIEW_ALIAS.BOOTCAMP_REMOVE_HIGHLIGHT
        if highlightType in [
                INTRO_HIGHLIGHT_TYPE.START_BUTTON,
                INTRO_HIGHLIGHT_TYPE.WELCOME_START_BUTTON
        ]:
            g_eventBus.handleEvent(
                events.LoadViewEvent(
                    SFViewLoadParams(eventId),
                    ctx=BOOTCAMP_UI_COMPONENTS.START_BATTLE_BUTTON
                    if highlightType == INTRO_HIGHLIGHT_TYPE.START_BUTTON else
                    BOOTCAMP_UI_COMPONENTS.WELCOME_START_BATTLE_BUTTON),
                EVENT_BUS_SCOPE.BATTLE)
        elif highlightType == INTRO_HIGHLIGHT_TYPE.ARROWS:
            for highlightName in ('LoadingRightButton', 'LoadingLeftButton'):
                g_eventBus.handleEvent(
                    events.LoadViewEvent(SFViewLoadParams(eventId),
                                         ctx=highlightName),
                    EVENT_BUS_SCOPE.BATTLE)

        else:
            LOG_ERROR_BOOTCAMP(
                'Unknown highlight type - {0}'.format(highlightType))
        if doHighlight:
            self._highlightingMask |= 1 << highlightType
        else:
            self._highlightingMask &= ~(1 << highlightType)
 def _processBackClick(self, ctx=None):
     if self._previewBackCb:
         self._previewBackCb()
     elif self._backAlias == VIEW_ALIAS.LOBBY_RESEARCH and g_currentPreviewVehicle.isPresent(
     ):
         event_dispatcher.showResearchView(
             self._vehicleCD,
             exitEvent=events.LoadViewEvent(
                 SFViewLoadParams(VIEW_ALIAS.LOBBY_TECHTREE),
                 ctx={'nation': g_currentPreviewVehicle.item.nationName}))
     elif self._backAlias == VIEW_ALIAS.VEHICLE_PREVIEW:
         entity = ctx.get('entity', None) if ctx else None
         if entity:
             compactDescr = entity.typeDescriptor.type.compactDescr
             if self.__itemsCache.items.inventory.getItemData(
                     compactDescr) is not None:
                 event_dispatcher.showHangar()
             else:
                 event_dispatcher.showVehiclePreview(
                     compactDescr, previewAlias=self._previousBackAlias)
         else:
             event_dispatcher.showHangar()
     elif self._backAlias == VIEW_ALIAS.LOBBY_STORE:
         showShop()
     else:
         event = g_entitiesFactories.makeLoadEvent(
             SFViewLoadParams(self._backAlias), {'isBackEvent': True})
         self.fireEvent(event, scope=EVENT_BUS_SCOPE.LOBBY)
     return
 def _loadBattlePage(arenaGuiType):
     if arenaGuiType == ARENA_GUI_TYPE.TUTORIAL:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.TUTORIAL_BATTLE_PAGE))
     elif arenaGuiType in (ARENA_GUI_TYPE.EPIC_RANDOM,
                           ARENA_GUI_TYPE.EPIC_RANDOM_TRAINING):
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.EPIC_RANDOM_PAGE))
     elif arenaGuiType == ARENA_GUI_TYPE.RANKED:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.RANKED_BATTLE_PAGE))
     elif arenaGuiType == ARENA_GUI_TYPE.BATTLE_ROYALE:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.BATTLE_ROYALE_PAGE))
     elif arenaGuiType == ARENA_GUI_TYPE.BOOTCAMP:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.BOOTCAMP_BATTLE_PAGE))
     elif arenaGuiType in ARENA_GUI_TYPE.EPIC_RANGE:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.EPIC_BATTLE_PAGE))
     elif arenaGuiType == ARENA_GUI_TYPE.EVENT_BATTLES:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.EVENT_BATTLE_PAGE))
     elif arenaGuiType == ARENA_GUI_TYPE.MAPS_TRAINING:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.MAPS_TRAINING_PAGE))
     elif arenaGuiType in ARENA_GUI_TYPE.STRONGHOLD_RANGE:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.STRONGHOLD_BATTLE_PAGE))
     else:
         event = events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.CLASSIC_BATTLE_PAGE))
     g_eventBus.handleEvent(event, EVENT_BUS_SCOPE.BATTLE)
Beispiel #6
0
 def __fireShowEvent(self, eventName, arg=None):
     if arg is None:
         self.__fireEvent(events.LoadViewEvent(SFViewLoadParams(eventName)))
     else:
         self.__fireEvent(
             events.LoadViewEvent(SFViewLoadParams(eventName), ctx=arg))
     return
 def hide(self):
     self._hideCallbackId = None
     if self.typeId not in self.HINT_IDS_TO_COMPLETE:
         self.playSound(self.HIDE_SOUND_ID)
     g_eventBus.handleEvent(events.LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.BOOTCAMP_HINT_HIDE, self.typeId)), self._scope)
     if self.typeId in PrimaryHintController.HINT_HIGHLIGHTS:
         g_eventBus.handleEvent(events.LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.BOOTCAMP_REMOVE_HIGHLIGHT), ctx=PrimaryHintController.HINT_HIGHLIGHTS[self.typeId]), EVENT_BUS_SCOPE.BATTLE)
     return
Beispiel #8
0
 def _createExitEvent(self):
     return events.LoadViewEvent(
         SFViewLoadParams(VIEW_ALIAS.LOBBY_RESEARCH),
         ctx={
             BackButtonContextKeys.ROOT_CD:
             self._data.getRootCD(),
             BackButtonContextKeys.EXIT:
             self._exitEvent or events.LoadViewEvent(
                 SFViewLoadParams(VIEW_ALIAS.LOBBY_HANGAR))
         })
 def close(self):
     g_eventBus.handleEvent(events.LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.BOOTCAMP_HINT_CLOSE)), self._scope)
     if self.typeId in PrimaryHintController.HINT_HIGHLIGHTS:
         g_eventBus.handleEvent(events.LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.BOOTCAMP_REMOVE_HIGHLIGHT), ctx=PrimaryHintController.HINT_HIGHLIGHTS[self.typeId]), EVENT_BUS_SCOPE.BATTLE)
     if self.voiceover and not self.muted:
         self._hintSystem.unscheduleVoiceover(self.voiceover)
     if self._hideCallbackId:
         BigWorld.cancelCallback(self._hideCallbackId)
         self._hideCallbackId = None
     return
Beispiel #10
0
 def __onResearchAction(self):
     exitToTechTree = events.LoadViewEvent(
         SFViewLoadParams(VIEW_ALIAS.LOBBY_TECHTREE),
         ctx={BackButtonContextKeys.NATION: self._vehicle.nationName})
     exitToResearchPage = events.LoadViewEvent(
         SFViewLoadParams(VIEW_ALIAS.LOBBY_RESEARCH),
         ctx={
             BackButtonContextKeys.ROOT_CD: self._vehicle.intCD,
             BackButtonContextKeys.EXIT: exitToTechTree
         })
     g_eventBus.handleEvent(exitToResearchPage, scope=EVENT_BUS_SCOPE.LOBBY)
 def onViewClose(self, isAcceptBtnClick=False):
     if isAcceptBtnClick:
         self.__settingsCore.serverSettings.saveInUIStorage(
             {PM_TUTOR_FIELDS.GREETING_SCREEN_SHOWN: True})
         self.fireEvent(events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.LOBBY_PERSONAL_MISSIONS)),
                        scope=EVENT_BUS_SCOPE.LOBBY)
     else:
         self.fireEvent(events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.LOBBY_HANGAR)),
                        scope=EVENT_BUS_SCOPE.LOBBY)
 def _callback(code, errStr):
     if isCodeValid(code):
         message = {
             'icon':
             'award',
             'title':
             LINKEDSET.LINKEDSET_FINISHED_TITTLE,
             'description':
             makeHtmlString(
                 'html_templates:lobby/quests/linkedSet',
                 'awardWindowDescTemplate', {
                     'msg':
                     _ms(LINKEDSET.LINKEDSET_FINISHED_DESC,
                         tank_name=vehicleShortUserName)
                 }),
             'buttonLabel':
             _ms(LINKEDSET.CONTINUE),
             'back':
             'red',
             'soundID':
             _SNDID_ACHIEVEMENT
         }
         g_eventBus.handleEvent(events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.LINKEDSET_HINTS),
             ctx={'messages': [message]}),
                                scope=EVENT_BUS_SCOPE.LOBBY)
         message = _ms('#system_messages:%s' % 'vehicle_buy/success',
                       vehName=vehicleShortUserName,
                       price=0)
         SystemMessages.pushI18nMessage(message,
                                        type=SM_TYPE.Information)
     else:
         LOG_WARNING(
             'Error occurred while trying to set LinkedSet reward',
             code, errStr)
 def _chooseVehicleRequest(self, levelsRange):
     playerInfo = self.prbEntity.getPlayerInfo()
     slotIdx = playerInfo.slotIdx
     vehicles = playerInfo.getSlotsToVehicles(True).get(slotIdx)
     if vehicles is not None:
         vehicles = self.itemsCache.items.getVehicles(
             REQ_CRITERIA.VEHICLE.SPECIFIC_BY_CD(vehicles))
     self.fireEvent(events.LoadViewEvent(
         SFViewLoadParams(CYBER_SPORT_ALIASES.VEHICLE_SELECTOR_POPUP_PY),
         ctx={
             'isMultiSelect': False,
             'vehicles': vehicles,
             'titleText': CYBERSPORT.WINDOW_VEHICLESELECTOR_TITLE,
             'selectButton':
             CYBERSPORT.WINDOW_VEHICLESELECTOR_BUTTONS_SELECT,
             'cancelButton':
             CYBERSPORT.WINDOW_VEHICLESELECTOR_BUTTONS_CANCEL,
             'infoText': self._getVehicleSelectorDescription(),
             'compatibleOnlyLabel':
             CYBERSPORT.WINDOW_VEHICLESELECTOR_FILTERS_MATCHES,
             'selectedVehicles': self._getVehicleSelectorVehicles(),
             'section': 'cs_unit_view_vehicle',
             'levelsRange': levelsRange
         }),
                    scope=EVENT_BUS_SCOPE.LOBBY)
     return
Beispiel #14
0
 def registerSettings(self):
     super(ConfigInterface, self).registerSettings()
     if not hasattr(BigWorld, 'g_modsListApi'):
         return
     # noinspection PyArgumentList
     g_entitiesFactories.addSettings(
         ViewSettings('RemodEnablerUI', RemodEnablerUI, 'RemodEnabler.swf',
                      ViewTypes.WINDOW, None, ScopeTemplates.GLOBAL_SCOPE,
                      False))
     kwargs = dict(
         id='RemodEnablerUI',
         name=self.i18n['UI_flash_header'],
         description=self.i18n['UI_flash_header_tooltip'],
         icon='gui/flash/RemodEnabler.png',
         enabled=self.data['enabled'],
         login=False,
         lobby=True,
         callback=lambda:
         (g_appLoader.getDefLobbyApp().containerManager.getContainer(
             ViewTypes.TOP_WINDOW).getViewCount() or g_appLoader.
          getDefLobbyApp().loadView(SFViewLoadParams('RemodEnablerUI'))))
     try:
         BigWorld.g_modsListApi.addModification(**kwargs)
     except AttributeError:
         BigWorld.g_modsListApi.addMod(**kwargs)
     self.isModAdded = True
 def _getExitEvent(self):
     hangarVehicleCD = None
     hangarVehicle = self.__hangarSpace.getVehicleEntity()
     currentVehicle = g_currentVehicle.item
     hangarVehicleDescr = hangarVehicle.typeDescriptor
     if self.__isHeroTank and currentVehicle is not None and hangarVehicleDescr is not None and hangarVehicleDescr.type.compactDescr != currentVehicle.compactDescr:
         hangarVehicleCD = hangarVehicleDescr.type.compactDescr
     return events.LoadViewEvent(
         SFViewLoadParams(self.alias),
         ctx={
             'itemCD': self._vehicleCD,
             'previewAlias': self._backAlias,
             'previousBackAlias': self._previousBackAlias,
             'vehicleStrCD': self.__vehicleStrCD,
             'previewBackCb': self._previewBackCb,
             'itemsPack': self.__unmodifiedItemsPack,
             'offers': self.__offers,
             'price': self._price,
             'oldPrice': self._oldPrice,
             'title': self._title,
             'description': self.__description,
             'endTime': self.__endTime,
             'buyParams': self.__buyParams,
             'vehParams': {
                 'styleCD': self.__customizationCD
             } if self.__customizationCD is not None else {},
             'isHeroTank': self.__isHeroTank,
             'hangarVehicleCD': hangarVehicleCD,
             'topPanelData': self.__topPanelData,
             'style': self.__ctx.get('style')
         })
    def _showAwardsFor(self, quests):
        if isPopupsWindowsOpenDisabled():
            return
        if quests:
            quests.sort(key=lambda q: (getLinkedSetMissionIDFromQuest(q),
                                       getLinkedSetQuestID(q)))
            messages = []
            for quest in quests:
                winMessage = self._getQuestWinMessage(quest)
                if self.isFinalQuest(quest):
                    messages.append(self._getLinkedSetWinMessage())
                    self._appendMessageWithViewCallback(
                        messages, winMessage, quest, True)
                hasHint = hasLocalizedQuestHintNameForLinkedSetQuest(quest)
                self._appendMessageWithViewCallback(messages, winMessage,
                                                    quest, not hasHint)
                if hasHint:
                    self._appendMessageWithViewCallback(
                        messages, self._getQuestHintMessage(quest), quest,
                        True)

            g_eventBus.handleEvent(events.LoadViewEvent(
                SFViewLoadParams(VIEW_ALIAS.LINKEDSET_HINTS),
                ctx={'messages': messages}),
                                   scope=EVENT_BUS_SCOPE.LOBBY)
 def __onClosePrebattle(self):
     g_eventBus.handleEvent(
         events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.BOOTCAMP_CLOSE_PREBATTLE)),
         EVENT_BUS_SCOPE.BATTLE)
     self.__idClosePrebattleTimer = None
     return
 def channelButtonClick(self):
     if not self.__manageWindow(
             MESSENGER_VIEW_ALIAS.CHANNEL_MANAGEMENT_WINDOW):
         self.fireEvent(events.LoadViewEvent(
             SFViewLoadParams(
                 MESSENGER_VIEW_ALIAS.CHANNEL_MANAGEMENT_WINDOW)),
                        scope=EVENT_BUS_SCOPE.LOBBY)
Beispiel #19
0
def skinLoader(loginView):
    global skinsChecked
    if g_config.data['enabled'] and g_config.skinsData[
            'models'] and not skinsChecked:
        lobbyApp = g_appLoader.getDefLobbyApp()
        if lobbyApp is not None:
            lobbyApp.loadView(SFViewLoadParams('SkinnerLoading'))
        else:
            return
        jobStartTime = time.time()
        try:
            yield skinCRC32All()
            yield modelsCheck()
            yield modelsProcess()
        except AdispException:
            traceback.print_exc()
        loadJson(g_config.ID, 'skinsCache', g_config.skinsCache,
                 g_config.configPath, True)
        print g_config.ID + ': total models check time:', datetime.timedelta(
            seconds=round(time.time() - jobStartTime))
        BigWorld.callback(
            1,
            partial(SoundGroups.g_instance.playSound2D,
                    'enemy_sighted_for_team'))
        BigWorld.callback(2, g_config.loadingProxy.onWindowClose)
        skinsChecked = True
        loginView.update()
Beispiel #20
0
def onAppInitialized(event):
    """fire load button view on application initialized"""
    if event.ns == APP_NAME_SPACE.SF_LOBBY:
        app = ServicesLocator.appLoader.getApp(event.ns)
        if not app:
            return
        app.loadView(SFViewLoadParams(MODS_LIST_API_BUTTON_ALIAS))
Beispiel #21
0
def toggleHelpDetailed(ctx):
    if _killHelpView():
        return
    g_eventBus.handleEvent(LoadViewEvent(SFViewLoadParams(
        VIEW_ALIAS.INGAME_DETAILS_HELP),
                                         ctx=ctx),
                           scope=_SCOPE)
 def hide(self):
     if self._onScreen:
         if self._typeId in SecondaryHintController.HINT_HIGHLIGHTS:
             g_eventBus.handleEvent(events.LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.BOOTCAMP_REMOVE_HIGHLIGHT), ctx=SecondaryHintController.HINT_HIGHLIGHTS[self._typeId]), EVENT_BUS_SCOPE.BATTLE)
         g_eventBus.handleEvent(events.BootcampEvent(events.BootcampEvent.HIDE_SECONDARY_HINT, None, None), EVENT_BUS_SCOPE.BATTLE)
         self._onScreen = False
     return
Beispiel #23
0
 def profile(self, cmd):
     g_eventBus.handleEvent(events.LoadViewEvent(
         SFViewLoadParams(VIEW_ALIAS.LOBBY_PROFILE),
         ctx={'selectedAlias': _PROFILE_TAB_ALIASES[cmd.selected_id]}
         if cmd.selected_id else None),
                            scope=EVENT_BUS_SCOPE.LOBBY)
     return
Beispiel #24
0
    def handleNextButton(self):
        bonuses = self._quest.getBonuses('tokens')
        hasCommander = False
        offerID = None
        for bonus in bonuses:
            for tID in bonus.getTokens():
                if getRecruitInfo(tID) is not None:
                    hasCommander = True
                    break
                if tID.startswith(OFFER_TOKEN_PREFIX):
                    for offer in self._offersProvider.getAvailableOffers(
                            onlyVisible=True):
                        if offer.token == tID:
                            offerID = offer.id

        if hasCommander:
            g_eventBus.handleEvent(events.LoadViewEvent(
                SFViewLoadParams(VIEW_ALIAS.LOBBY_BARRACKS),
                ctx={
                    'location':
                    BARRACKS_CONSTANTS.LOCATION_FILTER_NOT_RECRUITED
                }),
                                   scope=EVENT_BUS_SCOPE.LOBBY)
        elif offerID is not None:
            showOfferGiftsWindow(offerID)
        return
def showConnectToSecureChannelWindow(channel):
    g_eventBus.handleEvent(events.LoadViewEvent(SFViewLoadParams(
        MESSENGER_VIEW_ALIAS.CONNECT_TO_SECURE_CHANNEL_WINDOW,
        getViewName(MESSENGER_VIEW_ALIAS.CONNECT_TO_SECURE_CHANNEL_WINDOW,
                    channel.getClientID())),
                                                ctx={'channel': channel}),
                           scope=EVENT_BUS_SCOPE.LOBBY)
 def __onExit(self):
     if self.viewFlags == ViewFlags.LOBBY_TOP_SUB_VIEW:
         self.destroyWindow()
     else:
         g_eventBus.handleEvent(events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.LOBBY_HANGAR)),
                                scope=EVENT_BUS_SCOPE.LOBBY)
 def onShowRecruitWindowClick(self, rendererData, menuEnabled):
     self.fireEvent(
         LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.RECRUIT_WINDOW),
                       ctx={
                           'data': rendererData.clone(),
                           'menuEnabled': menuEnabled,
                           'currentVehicleId': g_currentVehicle.invID
                       }))
Beispiel #28
0
 def showChapterView(self, chapterIndex=0, pageIndex=0):
     self._isChapterViewOnScreen = True
     chapterView = self.getChapterView()
     if chapterView:
         chapterView.setData(chapterIndex, pageIndex)
         return
     g_eventBus.handleEvent(events.LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.MANUAL_CHAPTER_VIEW), ctx={'chapterIndex': chapterIndex,
      'pageIndex': pageIndex}), scope=EVENT_BUS_SCOPE.LOBBY)
 def onEscape(self):
     dialogsContainer = self.app.containerManager.getContainer(
         WindowLayer.TOP_WINDOW)
     if not dialogsContainer.getView(
             criteria={POP_UP_CRITERIA.VIEW_ALIAS: VIEW_ALIAS.LOBBY_MENU}):
         self.fireEvent(events.LoadViewEvent(
             SFViewLoadParams(VIEW_ALIAS.LOBBY_MENU)),
                        scope=EVENT_BUS_SCOPE.LOBBY)
 def showPrebattleInvitationsForm(self):
     self.fireEvent(events.LoadViewEvent(
         SFViewLoadParams(PREBATTLE_ALIASES.SEND_INVITES_WINDOW_PY),
         ctx={
             'prbName': 'training',
             'ctrlType': CTRL_ENTITY_TYPE.LEGACY
         }),
                    scope=EVENT_BUS_SCOPE.LOBBY)