def fini(self, clientPrb=None, ctx=None, woEvents=False): result = super(TrainingEntity, self).fini(clientPrb=clientPrb, ctx=ctx, woEvents=woEvents) g_eventBus.removeListener(ViewEventType.LOAD_VIEW, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY) g_eventBus.removeListener(ViewEventType.LOAD_GUI_IMPL_VIEW, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY) if not woEvents: aliasToLoad = [ PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY, PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY ] if not self.canSwitch(ctx) and g_eventDispatcher.needToLoadHangar( ctx, self.getModeFlags(), aliasToLoad): g_eventDispatcher.loadHangar() g_eventDispatcher.removeTrainingFromCarousel(False) self.storage.suspend() else: g_eventDispatcher.removeTrainingFromCarousel(False, closeWindow=False) if self.__watcher is not None: self.__watcher.stop() self.__watcher = None return result
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 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
def fini(self, clientPrb=None, ctx=None, woEvents=False): result = super(TrainingIntroEntity, self).fini(clientPrb=clientPrb, ctx=ctx, woEvents=woEvents) if not woEvents: aliasToLoad = [PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY, PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY] if not self.canSwitch(ctx) and g_eventDispatcher.needToLoadHangar(ctx, self.getModeFlags(), aliasToLoad): g_eventDispatcher.loadHangar() g_eventDispatcher.removeTrainingFromCarousel() else: g_eventDispatcher.removeTrainingFromCarousel(closeWindow=False) if self.__watcher is not None: self.__watcher.stop() self.__watcher = None return result