def fini(self, clientPrb=None, ctx=None, woEvents=False): super(EpicBattleTrainingEntity, self).fini(clientPrb=clientPrb, ctx=ctx, woEvents=woEvents) clientPrb = prb_getters.getClientPrebattle() if clientPrb is not None: clientPrb.onPlayerGroupChanged -= self.__prb_onPlayerGroupChanged remove = g_eventBus.removeListener for event in self.__loadEvents: remove(event, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY) if not woEvents: aliasToLoad = [ PREBATTLE_ALIASES.EPICBATTLE_LIST_VIEW_PY, PREBATTLE_ALIASES.EPIC_TRAINING_ROOM_VIEW_PY ] if not self.canSwitch(ctx) and g_eventDispatcher.needToLoadHangar( ctx, self.getModeFlags(), aliasToLoad): g_eventDispatcher.loadHangar() g_eventDispatcher.removeEpicTrainingFromCarousel(False) self.storage.suspend() else: g_eventDispatcher.removeEpicTrainingFromCarousel(False, closeWindow=False) return FUNCTIONAL_FLAG.UNDEFINED
def _populate(self): if self.prbDispatcher: funcState = self.prbDispatcher.getFunctionalState() if not funcState.isInLegacy(PREBATTLE_TYPE.EPIC_TRAINING): g_eventDispatcher.removeEpicTrainingFromCarousel(False) return super(EpicBattleTrainingRoom, self)._populate()
def fini(self, clientPrb=None, ctx=None, woEvents=False): result = super(EpicBattleTrainingIntroEntity, self).fini() if not woEvents: if not self.canSwitch(ctx): g_eventDispatcher.loadHangar() g_eventDispatcher.removeEpicTrainingFromCarousel() else: g_eventDispatcher.removeEpicTrainingFromCarousel(closeWindow=False) return result
def _populate(self): super(EpicBattlesList, self)._populate() funcState = self.prbDispatcher.getFunctionalState() if not funcState.isInLegacy(PREBATTLE_TYPE.EPIC_TRAINING): g_eventDispatcher.removeEpicTrainingFromCarousel() return self.addListener( events.TrainingSettingsEvent.UPDATE_EPIC_TRAINING_SETTINGS, self._createTrainingRoom, scope=EVENT_BUS_SCOPE.LOBBY)
def fini(self, clientPrb=None, ctx=None, woEvents=False): result = super(EpicBattleTrainingIntroEntity, self).fini() if not woEvents: aliasToLoad = [PREBATTLE_ALIASES.EPICBATTLE_LIST_VIEW_PY, PREBATTLE_ALIASES.EPIC_TRAINING_ROOM_VIEW_PY] if not self.canSwitch(ctx) and g_eventDispatcher.needToLoadHangar(ctx, self.getModeFlags(), aliasToLoad): g_eventDispatcher.loadHangar() g_eventDispatcher.removeEpicTrainingFromCarousel() else: g_eventDispatcher.removeEpicTrainingFromCarousel(closeWindow=False) return result