예제 #1
0
 def _populate(self):
     View._populate(self)
     g_prbLoader.setEnabled(True)
     self.addListener(events.LobbySimpleEvent.SHOW_HELPLAYOUT, self.__showHelpLayout, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(events.LobbySimpleEvent.CLOSE_HELPLAYOUT, self.__closeHelpLayout, EVENT_BUS_SCOPE.LOBBY)
     g_playerEvents.onVehicleBecomeElite += self.__onVehicleBecomeElite
     self.app.loaderManager.onViewLoadInit += self.__onViewLoadInit
     self.app.loaderManager.onViewLoaded += self.__onViewLoaded
     self.app.loaderManager.onViewLoadError += self.__onViewLoadError
     self.__showBattleResults()
     if self.app.browser is not None and constants.IS_CHINA:
         self.app.browser.checkBattlesCounter()
     return
예제 #2
0
파일: lobbyview.py 프로젝트: webiumsk/WoT
 def _populate(self):
     View._populate(self)
     self.__currIgrType = gui.game_control.g_instance.igr.getRoomType()
     g_prbLoader.setEnabled(True)
     self.addListener(events.LobbySimpleEvent.SHOW_HELPLAYOUT, self.__showHelpLayout, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(events.LobbySimpleEvent.CLOSE_HELPLAYOUT, self.__closeHelpLayout, EVENT_BUS_SCOPE.LOBBY)
     g_playerEvents.onVehicleBecomeElite += self.__onVehicleBecomeElite
     self.app.loaderManager.onViewLoadInit += self.__onViewLoadInit
     self.app.loaderManager.onViewLoaded += self.__onViewLoaded
     self.app.loaderManager.onViewLoadError += self.__onViewLoadError
     game_control.g_instance.igr.onIgrTypeChanged += self.__onIgrTypeChanged
     self.__showBattleResults()
     self.fireEvent(events.GUICommonEvent(events.GUICommonEvent.LOBBY_VIEW_LOADED))
     keyCode = CommandMapping.g_instance.get('CMD_VOICECHAT_MUTE')
     if not BigWorld.isKeyDown(keyCode):
         VOIP.getVOIPManager().setMicMute(True)
예제 #3
0
 def _populate(self):
     View._populate(self)
     self.__currIgrType = gui.game_control.g_instance.igr.getRoomType()
     g_prbLoader.setEnabled(True)
     self.addListener(events.LobbySimpleEvent.SHOW_HELPLAYOUT, self.__showHelpLayout, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(events.LobbySimpleEvent.CLOSE_HELPLAYOUT, self.__closeHelpLayout, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(events.GameEvent.SCREEN_SHOT_MADE, self.__handleScreenShotMade, EVENT_BUS_SCOPE.GLOBAL)
     g_playerEvents.onVehicleBecomeElite += self.__onVehicleBecomeElite
     self.app.loaderManager.onViewLoadInit += self.__onViewLoadInit
     self.app.loaderManager.onViewLoaded += self.__onViewLoaded
     self.app.loaderManager.onViewLoadError += self.__onViewLoadError
     game_control.g_instance.igr.onIgrTypeChanged += self.__onIgrTypeChanged
     self.__showBattleResults()
     battlesCount = g_itemsCache.items.getAccountDossier().getTotalStats().getBattlesCount()
     g_lobbyContext.updateBattlesCount(battlesCount)
     self.fireEvent(events.GUICommonEvent(events.GUICommonEvent.LOBBY_VIEW_LOADED))
     self.bwProto.voipController.invalidateMicrophoneMute()
예제 #4
0
 def _populate(self):
     View._populate(self)
     self.__currIgrType = gui.game_control.g_instance.igr.getRoomType()
     g_prbLoader.setEnabled(True)
     self.addListener(events.LobbySimpleEvent.SHOW_HELPLAYOUT, self.__showHelpLayout, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(events.LobbySimpleEvent.CLOSE_HELPLAYOUT, self.__closeHelpLayout, EVENT_BUS_SCOPE.LOBBY)
     self.addListener(events.GameEvent.SCREEN_SHOT_MADE, self.__handleScreenShotMade, EVENT_BUS_SCOPE.GLOBAL)
     g_playerEvents.onVehicleBecomeElite += self.__onVehicleBecomeElite
     self.app.loaderManager.onViewLoadInit += self.__onViewLoadInit
     self.app.loaderManager.onViewLoaded += self.__onViewLoaded
     self.app.loaderManager.onViewLoadError += self.__onViewLoadError
     game_control.g_instance.igr.onIgrTypeChanged += self.__onIgrTypeChanged
     self.__showBattleResults()
     battlesCount = g_itemsCache.items.getAccountDossier().getTotalStats().getBattlesCount()
     g_lobbyContext.updateBattlesCount(battlesCount)
     self.fireEvent(events.GUICommonEvent(events.GUICommonEvent.LOBBY_VIEW_LOADED))
     keyCode = CommandMapping.g_instance.get('CMD_VOICECHAT_MUTE')
     if not BigWorld.isKeyDown(keyCode):
         VOIP.getVOIPManager().setMicMute(True)
예제 #5
0
 def _invalidate(self, *args, **kwargs):
     g_prbLoader.setEnabled(True)
     super(LobbyView, self)._invalidate(*args, **kwargs)
예제 #6
0
 def start(self, lessonNum, isBattleLesson):
     LOG_DEBUG_DEV_BOOTCAMP('Starting bootcamp', lessonNum, isBattleLesson)
     from gui.shared.personality import ServicesLocator
     if BattleReplay.g_replayCtrl.isPlaying:
         self.__replayController = BootcampReplayController()
         self.__replayController.init()
     g_bootcampEvents.onBattleLessonFinished += self.onBattleLessonFinished
     g_bootcampEvents.onGarageLessonFinished += self.onGarageLessonFinished
     g_bootcampEvents.onBattleLoaded += self.onBattleLoaded
     g_bootcampEvents.onResultScreenFinished += self.onResultScreenFinished
     g_bootcampEvents.onRequestBootcampFinish += self.onRequestBootcampFinish
     g_bootcampEvents.onOutroVideoStop += self.onOutroVideoStop
     g_bootcampEvents.onBootcampBecomeNonPlayer += self.onBootcampBecomeNonPlayer
     g_playerEvents.onAvatarBecomeNonPlayer += self.__onAvatarBecomeNonPlayer
     g_playerEvents.onArenaCreated += self.__onArenaCreated
     self.connectionMgr.onDisconnected += self.__cm_onDisconnected
     self.__requestBootcampFinishFromBattle = False
     ctx = self.getContext()
     isRelogin = ctx['relogin']
     LOG_DEBUG_DEV_BOOTCAMP('IsRelogin', isRelogin)
     autoStartBattle = isRelogin or BattleReplay.isPlaying()
     if not autoStartBattle:
         self.showActionWaitWindow()
         yield self.settingsCore.serverSettings.settingsCache.update()
         self.settingsCore.serverSettings.applySettings()
         isNewbie = False
         if ctx['isNewbieSettings'] and not ctx['completed'] and ctx[
                 'runCount'] == 1:
             isNewbie = True
         self.__setupPreferences(isNewbie)
         self.hideActionWaitWindow()
         eula = EULADispatcher()
         yield eula.processLicense()
         eula.fini()
     self.__running = True
     self.__lessonId = lessonNum
     self.__lessonType = BOOTCAMP_LESSON.BATTLE if isBattleLesson else BOOTCAMP_LESSON.GARAGE
     if (lessonNum == 0 or not isBattleLesson) and not autoStartBattle:
         self.showActionWaitWindow()
         yield ServicesLocator.itemsCache.update(CACHE_SYNC_REASON.SHOW_GUI)
         self.hideActionWaitWindow()
     if self.__currentState is not None:
         self.__currentState.deactivate()
     self.__hangarSpace = ctx['hangarSpace']
     self.__hangarSpacePremium = ctx['hangarSpacePremium']
     self.__bonuses = ctx['bonuses']
     showRewards = ctx['needAwarding']
     previousLesson = self.getContextIntParameter('lastLessonNum') - 1
     if previousLesson >= 0 and previousLesson < len(
             self.__bonuses['battle']):
         self.__bonuses['battle'][previousLesson][
             'showRewards'] = showRewards
     self.__nation = ctx['nation']
     self.__nationsData = ctx['nationsData']
     self.__p['completed'] = ctx['completed']
     self.__p['needAwarding'] = ctx['needAwarding']
     weave(self.__weaver)
     if AccountSettings.isCleanPC():
         dropNewSettingsCounters()
     g_bootcampEvents.onBootcampStarted()
     if not autoStartBattle:
         if isBattleLesson:
             g_prbLoader.createBattleDispatcher()
             g_prbLoader.setEnabled(True)
             self.enqueueBattleLesson()
         else:
             self.showActionWaitWindow()
             yield self.nextFrame()
             self.__currentState = StateInGarage()
             ReloadLobbyHelper().reload()
             self.hideActionWaitWindow()
             self.__currentState.activate()
     else:
         from states.StateBattlePreparing import StateBattlePreparing
         self.__currentState = StateBattlePreparing(self.__lessonId,
                                                    BigWorld.player())
         self.__currentState.activate()
     BigWorld.overloadBorders(True)
     if self.__chapter is None:
         self.__chapter = Chapter()
     if self.__gui is None:
         self.__gui = BootcampGUI()
     WWISE.loadSoundPool(self.BOOTCAMP_SOUND_BANKS, 14, 'Bootcamp')
     self.sessionProvider.getCtx().setPlayerFullNameFormatter(
         _BCNameFormatter())
     return