def _dispose(self):
     specialData = getHeroTankPreviewParams() if self.__isHeroTank else None
     if specialData is not None and specialData.exitEvent:
         SoundGroups.g_instance.playSound2D(specialData.exitEvent)
     self.removeListener(CameraRelatedEvents.VEHICLE_LOADING,
                         self.__onVehicleLoading, EVENT_BUS_SCOPE.DEFAULT)
     g_clientUpdateManager.removeObjectCallbacks(self)
     g_currentPreviewVehicle.onChanged -= self.__onVehicleChanged
     g_currentPreviewVehicle.onVehicleInventoryChanged -= self.__onInventoryChanged
     self.__comparisonBasket.onChange -= self.__onCompareBasketChanged
     self.__comparisonBasket.onSwitchChange -= self.__updateHeaderData
     self.__hangarSpace.onSpaceCreate -= self.__onHangarCreateOrRefresh
     self.__hangarSpace.setVehicleSelectable(
         self.__keepVehicleSelectionEnabled)
     self.removeListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED,
                         self.handleSelectedEntityUpdated)
     if self._needToResetAppearance:
         g_currentPreviewVehicle.selectNoVehicle()
         g_currentPreviewVehicle.resetAppearance()
     g_eventBus.handleEvent(events.LobbySimpleEvent(
         events.LobbySimpleEvent.VEHICLE_PREVIEW_HIDDEN),
                            scope=EVENT_BUS_SCOPE.LOBBY)
     if self._backAlias == VIEW_ALIAS.VEHICLE_PREVIEW:
         g_currentVehicle.refreshModel()
     self._previewBackCb = None
     self.__unmodifiedItemsPack = None
     super(VehiclePreview, self)._dispose()
     if not self._heroInteractive:
         self.__heroTanksControl.setInteractive(True)
     if self.__vehAppearanceChanged:
         g_currentPreviewVehicle.resetAppearance()
     g_eventBus.removeListener(OFFER_CHANGED_EVENT, self.__onOfferChanged)
     return
Exemplo n.º 2
0
 def moveSpace(self, dx, dy, dz):
     self.fireEvent(CameraRelatedEvents(CameraRelatedEvents.LOBBY_VIEW_MOUSE_MOVE, ctx={'dx': dx,
      'dy': dy,
      'dz': dz}))
     self.fireEvent(events.LobbySimpleEvent(events.LobbySimpleEvent.NOTIFY_SPACE_MOVED, ctx={'dx': dx,
      'dy': dy,
      'dz': dz}))
 def notifyCursorOver3dScene(self, isOver3dScene):
     if self.mapsTrainingController.isMapsTrainingPrbActive:
         container = self.app.containerManager.getContainer(WindowLayer.SUB_VIEW)
         view = container.getView()
         if view and view.alias not in VEHICLE_PREVIEW_ALIASES:
             return
     self.fireEvent(events.LobbySimpleEvent(events.LobbySimpleEvent.NOTIFY_CURSOR_OVER_3DSCENE, ctx={'isOver3dScene': isOver3dScene}))
Exemplo n.º 4
0
 def showQuestById(self, questId, eventType):
     g_eventBus.handleEvent(
         events.LobbySimpleEvent(
             events.LobbySimpleEvent.BATTLE_RESULTS_SHOW_QUEST,
             ctx={
                 'questId': questId,
                 'eventType': eventType
             }))
 def _hideWaiting(self, task):
     view = self.getWaitingView(task.isBlocking)
     if view:
         view.hideWaiting()
         if task.isBlocking:
             g_eventBus.handleEvent(events.LobbySimpleEvent(
                 events.LobbySimpleEvent.WAITING_HIDDEN),
                                    scope=EVENT_BUS_SCOPE.LOBBY)
Exemplo n.º 6
0
 def __onShowQuestById(self, args):
     questId = args.get('id')
     eventType = args.get('eventType')
     g_eventBus.handleEvent(
         events.LobbySimpleEvent(
             events.LobbySimpleEvent.BATTLE_RESULTS_SHOW_QUEST,
             ctx={
                 'questId': questId,
                 'eventType': eventType
             }))
Exemplo n.º 7
0
 def moveSpace(self, dx, dy, dz):
     dx, dy, dz = int(dx), int(dy), int(dz)
     if g_hangarSpace.space:
         g_hangarSpace.space.handleMouseEvent(dx, dy, dz)
     self.fireEvent(
         events.LobbySimpleEvent(events.LobbySimpleEvent.NOTIFY_SPACE_MOVED,
                                 ctx={
                                     'dx': dx,
                                     'dy': dy,
                                     'dz': dz
                                 }))
Exemplo n.º 8
0
 def _dispose(self):
     self.__unsubscribe()
     self.__unselectVehicle()
     if self.__destroyCallback is not None:
         self.__destroyCallback()
         self.__destroyCallback = None
     g_eventBus.handleEvent(events.LobbySimpleEvent(
         events.LobbySimpleEvent.VEHICLE_PREVIEW_HIDDEN),
                            scope=EVENT_BUS_SCOPE.LOBBY)
     super(VehicleStylePreview, self)._dispose()
     return
Exemplo n.º 9
0
def visitEventGUI(event):
    if event is None:
        return
    s = get()
    isNaVisitedChanged = s.updateVisited('naVisited', event.getID())
    if event.isAvailable()[0]:
        isVisitedChanged = s.updateVisited('visited', event.getID())
    else:
        isVisitedChanged = False
    if isNaVisitedChanged or isVisitedChanged:
        s.save()
        g_eventBus.handleEvent(events.LobbySimpleEvent(events.LobbySimpleEvent.EVENTS_UPDATED))
Exemplo n.º 10
0
 def _dispose(self):
     self.__selectedVehicleEntityId = None
     self.removeListener(CameraRelatedEvents.VEHICLE_LOADING,
                         self.__onVehicleLoading, EVENT_BUS_SCOPE.DEFAULT)
     g_clientUpdateManager.removeObjectCallbacks(self)
     self.__hangarSpace.onSpaceCreate -= self.__onHangarCreateOrRefresh
     self.__heroTanksControl.setInteractive(True)
     g_currentPreviewVehicle.selectNoVehicle()
     g_currentPreviewVehicle.resetAppearance()
     g_eventBus.handleEvent(events.LobbySimpleEvent(
         events.LobbySimpleEvent.VEHICLE_PREVIEW_HIDDEN),
                            scope=EVENT_BUS_SCOPE.LOBBY)
     super(VehicleStylePreview, self)._dispose()
     return
Exemplo n.º 11
0
def visitQuestsGUI(quest):
    if quest is None:
        return
    else:
        s = dict(AccountSettings.getSettings('quests'))
        settings = ['naVisited']
        if quest.isAvailable():
            settings.append('visited')
        for setting in settings:
            s[setting] = tuple(set(s[setting]) | set([quest.getID()]))

        s['lastVisitTime'] = time.time()
        AccountSettings.setSettings('quests', s)
        g_eventBus.handleEvent(events.LobbySimpleEvent(events.LobbySimpleEvent.QUESTS_UPDATED))
        return
Exemplo n.º 12
0
 def _moveSpaceHandler(args=None):
     if args is None:
         return
     else:
         ctx = {
             'dx': args.get('dx'),
             'dy': args.get('dy'),
             'dz': args.get('dz')
         }
         g_eventBus.handleEvent(
             CameraRelatedEvents(CameraRelatedEvents.LOBBY_VIEW_MOUSE_MOVE,
                                 ctx=ctx), EVENT_BUS_SCOPE.GLOBAL)
         g_eventBus.handleEvent(
             events.LobbySimpleEvent(
                 events.LobbySimpleEvent.NOTIFY_SPACE_MOVED, ctx=ctx),
             EVENT_BUS_SCOPE.GLOBAL)
         return
Exemplo n.º 13
0
 def _showWaiting(self, task):
     view = self.getWaitingView(task.isBlocking)
     if view is None and not task.isBlocking:
         view = self.getWaitingView(True)
         if view is not None:
             task.isBlocking = True
     if view is not None:
         if task.backgroundImage:
             view.setBackgroundImage(task.backgroundImage)
         view.showWaiting(task.messageID)
         appLoader = dependency.instance(IAppLoader)
         view.showAwards(appLoader.getSpaceID() == GuiGlobalSpaceID.LOGIN)
         self.__isShown = True
         if task.isBlocking:
             view.setCallback(task.interrupt)
             g_eventBus.handleEvent(events.LobbySimpleEvent(
                 events.LobbySimpleEvent.WAITING_SHOWN),
                                    scope=EVENT_BUS_SCOPE.LOBBY)
     return
Exemplo n.º 14
0
    def __invalidateData(self, callback=lambda *args: None):
        def cbWrapper(*args):
            self.__waitForSync = False
            self.onSyncCompleted()
            callback(*args)

        self.__clearInvalidateCallback()
        self.__waitForSync = True
        self.onSyncStarted()
        self.__progress.request()(cbWrapper)
        minFinishTimeLeft = sys.maxint
        for q in self.getCurrentQuests().itervalues():
            minFinishTimeLeft = min(minFinishTimeLeft, q.getFinishTimeLeft())

        for q in self.getFutureQuests().itervalues():
            minFinishTimeLeft = min(minFinishTimeLeft, q.getStartTimeLeft())

        if minFinishTimeLeft != sys.maxint:
            self.__loadInvalidateCallback(minFinishTimeLeft)
        from gui.shared import g_eventBus
        g_eventBus.handleEvent(
            events.LobbySimpleEvent(events.LobbySimpleEvent.QUESTS_UPDATED))
Exemplo n.º 15
0
 def __onMoveSpace(args=None):
     if args is None:
         return
     else:
         dx = args.get('dx')
         dy = args.get('dy')
         dz = args.get('dz')
         g_eventBus.handleEvent(
             CameraRelatedEvents(CameraRelatedEvents.LOBBY_VIEW_MOUSE_MOVE,
                                 ctx={
                                     'dx': dx,
                                     'dy': dy,
                                     'dz': dz
                                 }), EVENT_BUS_SCOPE.GLOBAL)
         g_eventBus.handleEvent(
             events.LobbySimpleEvent(
                 events.LobbySimpleEvent.NOTIFY_SPACE_MOVED,
                 ctx={
                     'dx': dx,
                     'dy': dy,
                     'dz': dz
                 }), EVENT_BUS_SCOPE.GLOBAL)
         return
Exemplo n.º 16
0
 def update(self):
     prbDispatcher = g_prbLoader.getDispatcher()
     if not prbDispatcher:
         return
     else:
         prbFunctional = prbDispatcher.getPrbFunctional()
         hasModalEntity, prbType = prbDispatcher.getFunctionalState()
         inPrebattle = prbType is not 0
         isTraining = prbType is PREBATTLE_TYPE.TRAINING
         disableHint = None
         disabled = False
         if self.__isActionsLocked:
             disabled = True
         else:
             canDo, restriction = prbDispatcher.canPlayerDoAction()
             if not canDo:
                 disabled = True
                 disableHint = getActionDisabledTooltip(
                     restriction, functional=prbFunctional)
         self.__disableFightButton(disabled, disableHint)
         label = MENU.HEADERBUTTONS_BATTLE
         isCreator = prbFunctional.isCreator()
         if not isTraining and not isCreator:
             playerInfo = prbFunctional.getPlayerInfo()
             if inPrebattle and playerInfo is not None:
                 if playerInfo.isReady():
                     label = MENU.HEADERBUTTONS_NOTREADY
                 else:
                     label = MENU.HEADERBUTTONS_READY
         if prbDispatcher.getUnitFunctional().hasEntity():
             menu = MENU.HEADERBUTTONS_BATTLE_MENU_UNIT
         else:
             menu = self.__menuLabels.get(
                 prbType, MENU.HEADERBUTTONS_BATTLE_MENU_STANDART)
         fightTypes = list()
         if self.__currentLockedView == VIEW_ALIAS.BATTLE_QUEUE:
             fightTypes.append({
                 'label':
                 MENU.HEADERBUTTONS_BATTLE_TYPES_STANDART,
                 'data':
                 PREBATTLE_ACTION_NAME.LEAVE_RANDOM_QUEUE,
                 'disabled':
                 True,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_STANDART,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_STANDARTLEAVE_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.LEAVE_RANDOM_QUEUE,
                 'active':
                 True
             })
         else:
             fightTypes.append({
                 'label':
                 MENU.HEADERBUTTONS_BATTLE_TYPES_STANDART,
                 'data':
                 PREBATTLE_ACTION_NAME.JOIN_RANDOM_QUEUE,
                 'disabled':
                 disabled or hasModalEntity,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_STANDART,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_STANDART_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.JOIN_RANDOM_QUEUE,
                 'active':
                 False
             })
         if prbType is PREBATTLE_TYPE.SQUAD:
             fightTypes.append({
                 'label':
                 '#menu:headerButtons/battle/types/squadLeave%s' %
                 ('Owner' if isCreator else ''),
                 'data':
                 PREBATTLE_ACTION_NAME.PREBATTLE_LEAVE,
                 'disabled':
                 self.__currentLockedView == VIEW_ALIAS.BATTLE_QUEUE,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_SQUADLEAVE,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_SQUADLEAVE_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.SQUAD,
                 'active':
                 True
             })
         else:
             fightTypes.append({
                 'label':
                 MENU.HEADERBUTTONS_BATTLE_TYPES_SQUAD,
                 'data':
                 PREBATTLE_ACTION_NAME.SQUAD,
                 'disabled':
                 disabled or hasModalEntity,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_SQUAD,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_SQUAD_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.SQUAD,
                 'active':
                 False
             })
         units = AccountSettings.getSettings('unitWindow')
         if prbType is PREBATTLE_TYPE.UNIT:
             fightTypes.append({
                 'label':
                 MENU.HEADERBUTTONS_BATTLE_TYPES_UNITLEAVE,
                 'data':
                 PREBATTLE_ACTION_NAME.UNIT_LEAVE,
                 'disabled':
                 False,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_LEAVEUNIT,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_LEAVEUNIT_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.UNIT,
                 'active':
                 True,
                 'isUnitOpened':
                 units['isOpened']
             })
         else:
             fightTypes.append({
                 'label':
                 MENU.HEADERBUTTONS_BATTLE_TYPES_UNIT,
                 'data':
                 PREBATTLE_ACTION_NAME.UNIT,
                 'disabled':
                 disabled or inPrebattle,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_UNIT,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_UNIT_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.UNIT,
                 'active':
                 False,
                 'isUnitOpened':
                 units['isOpened']
             })
         if prbType is PREBATTLE_TYPE.COMPANY:
             fightTypes.append({
                 'label':
                 '#menu:headerButtons/battle/types/companyLeave%s' %
                 ('Owner' if isCreator else ''),
                 'data':
                 PREBATTLE_ACTION_NAME.PREBATTLE_LEAVE,
                 'disabled':
                 self.__currentLockedView == VIEW_ALIAS.BATTLE_QUEUE,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_LEAVECOMPANY,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_LEAVECOMPANY_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.COMPANY_LIST,
                 'active':
                 True
             })
         else:
             fightTypes.append({
                 'label':
                 MENU.HEADERBUTTONS_BATTLE_TYPES_COMPANY,
                 'data':
                 PREBATTLE_ACTION_NAME.COMPANY_LIST,
                 'disabled':
                 disabled or hasModalEntity,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_COMPANY,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_COMPANY_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.COMPANY_LIST,
                 'active':
                 False
             })
         if GUI_SETTINGS.specPrebatlesVisible:
             if prbType in [PREBATTLE_TYPE.CLAN, PREBATTLE_TYPE.TOURNAMENT]:
                 fightTypes.append({
                     'label':
                     MENU.HEADERBUTTONS_BATTLE_TYPES_SPECLEAVE,
                     'data':
                     PREBATTLE_ACTION_NAME.PREBATTLE_LEAVE,
                     'disabled':
                     False,
                     'tooltip':
                     TOOLTIPS.BATTLETYPES_LEAVESPEC,
                     'description':
                     i18n.makeString(
                         MENU.HEADERBUTTONS_BATTLE_TYPES_LEAVESPEC_DESCR),
                     'icon':
                     PREBATTLE_ACTION_NAME.SPEC_BATTLE_LIST,
                     'active':
                     True
                 })
             else:
                 fightTypes.append({
                     'label':
                     MENU.HEADERBUTTONS_BATTLE_TYPES_SPEC,
                     'data':
                     PREBATTLE_ACTION_NAME.SPEC_BATTLE_LIST,
                     'disabled':
                     disabled or hasModalEntity or areSpecBattlesHidden(),
                     'tooltip':
                     TOOLTIPS.BATTLETYPES_SPEC,
                     'description':
                     i18n.makeString(
                         MENU.HEADERBUTTONS_BATTLE_TYPES_SPEC_DESCR),
                     'icon':
                     PREBATTLE_ACTION_NAME.SPEC_BATTLE_LIST,
                     'active':
                     False
                 })
         if isTraining:
             fightTypes.append({
                 'label':
                 '#menu:headerButtons/battle/types/trainingLeave%s' %
                 ('Owner' if isCreator else ''),
                 'data':
                 PREBATTLE_ACTION_NAME.PREBATTLE_LEAVE,
                 'disabled':
                 False,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_LEAVETRAINING,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_LEAVETRAINING_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.TRAINING_LIST,
                 'active':
                 True
             })
         elif self.__currentLockedView == VIEW_ALIAS.LOBBY_TRAININGS:
             menu = MENU.HEADERBUTTONS_BATTLE_MENU_TRAINING
             fightTypes.append({
                 'label':
                 '#menu:headerButtons/battle/types/trainingLeave',
                 'data':
                 PREBATTLE_ACTION_NAME.LEAVE_TRAINING_LIST,
                 'disabled':
                 False,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_LEAVETRAINING,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_LEAVETRAINING_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.TRAINING_LIST,
                 'active':
                 True
             })
         else:
             fightTypes.append({
                 'label':
                 MENU.HEADERBUTTONS_BATTLE_TYPES_TRAINING,
                 'data':
                 PREBATTLE_ACTION_NAME.TRAINING_LIST,
                 'disabled':
                 disabled or hasModalEntity,
                 'tooltip':
                 TOOLTIPS.BATTLETYPES_TRAINING,
                 'description':
                 i18n.makeString(
                     MENU.HEADERBUTTONS_BATTLE_TYPES_TRAINING_DESCR),
                 'icon':
                 PREBATTLE_ACTION_NAME.TRAINING_LIST,
                 'active':
                 False
             })
         disableDropDown = self.__currentLockedView == VIEW_ALIAS.BATTLE_QUEUE
         self.__onFightButtonSet(label, menu, fightTypes, disableDropDown)
         self.fireEvent(events.LobbySimpleEvent(
             events.LobbySimpleEvent.UPDATE_TANK_PARAMS),
                        scope=EVENT_BUS_SCOPE.LOBBY)
         return
Exemplo n.º 17
0
def notifyBattleResultsPosted(arenaUniqueID):
    g_eventBus.handleEvent(
        events.LobbySimpleEvent(events.LobbySimpleEvent.BATTLE_RESULTS_POSTED,
                                {'arenaUniqueID': arenaUniqueID}),
        EVENT_BUS_SCOPE.LOBBY)
 def __onAddXPBonusChanged(self):
     g_eventBus.handleEvent(
         events.LobbySimpleEvent(
             events.LobbySimpleEvent.PREMIUM_XP_BONUS_CHANGED))
Exemplo n.º 19
0
 def notifyCursorDragging(self, isDragging):
     self.fireEvent(
         events.LobbySimpleEvent(
             events.LobbySimpleEvent.NOTIFY_CURSOR_DRAGGING,
             ctx={'isDragging': isDragging}))
Exemplo n.º 20
0
 def notifyCursorOver3dScene(self, isOver3dScene):
     self.fireEvent(
         events.LobbySimpleEvent(
             events.LobbySimpleEvent.NOTIFY_CURSOR_OVER_3DSCENE,
             ctx={'isOver3dScene': isOver3dScene}))
Exemplo n.º 21
0
 def __onMouseOver3dScene(args):
     g_eventBus.handleEvent(
         events.LobbySimpleEvent(
             events.LobbySimpleEvent.NOTIFY_CURSOR_OVER_3DSCENE,
             ctx={'isOver3dScene': bool(args.get('isOver3dScene'))}))
Exemplo n.º 22
0
    def __invalidateData(self, callback=lambda *args: None):
        self.__clearCache()
        self.__clearInvalidateCallback()
        self.__waitForSync = True
        self.onSyncStarted()
        self.__updateCommonQuests()
        for action in self.getActions().itervalues():
            for modifier in action.getModifiers():
                section = modifier.getSection()
                type = modifier.getType()
                itemType = modifier.getItemType()
                values = modifier.getValues(action)
                currentSection = self.__actionsCache[section][type]
                if itemType is not None:
                    currentSection = currentSection.setdefault(itemType, {})
                for k in values:
                    if k in currentSection:
                        currentSection[k] += values[k]
                    else:
                        currentSection[k] = values[k]

        rareAchieves = set()
        invalidateTimeLeft = sys.maxint
        for q in self.getCurrentEvents().itervalues():
            dossierBonuses = q.getBonuses('dossier')
            if dossierBonuses:
                storage = self.__questsDossierBonuses[q.getID()]
                for bonus in dossierBonuses:
                    records = bonus.getRecords()
                    storage.update(set(bonus.getRecords().keys()))
                    rareAchieves |= set((rId for r, rId in records.iteritems()
                                         if r[0] == ACHIEVEMENT_BLOCK.RARE))

            timeLeftInfo = q.getNearestActivityTimeLeft()
            if timeLeftInfo is not None:
                isAvailable, errorMsg = q.isAvailable()
                if not isAvailable:
                    if errorMsg in ('invalid_weekday',
                                    'invalid_time_interval'):
                        invalidateTimeLeft = min(invalidateTimeLeft,
                                                 timeLeftInfo[0])
                else:
                    intervalBeginTimeLeft, (intervalStart,
                                            intervalEnd) = timeLeftInfo
                    invalidateTimeLeft = min(
                        invalidateTimeLeft,
                        intervalBeginTimeLeft + intervalEnd - intervalStart)
            else:
                invalidateTimeLeft = min(invalidateTimeLeft,
                                         q.getFinishTimeLeft())

        g_rareAchievesCache.request(rareAchieves)
        for q in self.getFutureEvents().itervalues():
            timeLeftInfo = q.getNearestActivityTimeLeft()
            if timeLeftInfo is None:
                startTime = q.getStartTimeLeft()
            else:
                startTime = timeLeftInfo[0]
            invalidateTimeLeft = min(invalidateTimeLeft, startTime)

        if invalidateTimeLeft != sys.maxint:
            self.__loadInvalidateCallback(invalidateTimeLeft)
        self.__waitForSync = False
        self.__prefetcher.ask()
        self.__syncActionsWithQuests()
        self.__invalidateCompensations()
        self.onSyncCompleted()
        callback(True)
        from gui.shared import g_eventBus
        g_eventBus.handleEvent(
            events.LobbySimpleEvent(events.LobbySimpleEvent.EVENTS_UPDATED))
        return