def _loadWindow(self, ctx): """ Routine musk be invoked to load squad's prebattle window Args: ctx: initialization's request context """ prbType = self._entity.getEntityType() g_eventDispatcher.loadSquad(prbType, ctx, self._getTeamReady())
def executeInit(self, ctx): initResult = FUNCTIONAL_INIT_RESULT.UNDEFINED if self._functional.getPlayerInfo().isReady and self._functional.getFlags().isInQueue(): g_eventDispatcher.loadBattleQueue() initResult = FUNCTIONAL_INIT_RESULT.LOAD_PAGE squadCtx = None if ctx is not None: isCreationCtx = ctx.getRequestType() is REQUEST_TYPE.CREATE if isCreationCtx: accountsToInvite = ctx.getAccountsToInvite() showInvitesWindow = True if accountsToInvite: showInvitesWindow = False self._functional.request(SendInvitesCtx(accountsToInvite, '')) squadCtx = {'showInvitesWindow': showInvitesWindow} g_eventDispatcher.loadSquad(squadCtx, self.__getTeamReady()) return initResult
def init(self, clientPrb = None, ctx = None): result = super(SquadFunctional, self).init(clientPrb=clientPrb) isCreationCtx, accountsToInvite = False, [] if ctx is not None: isCreationCtx = ctx.getRequestType() is REQUEST_TYPE.CREATE if isCreationCtx: accountsToInvite = ctx.getAccountsToInvite() if self.getPlayerInfo().isReady() and self.getTeamState(team=1).isInQueue(): g_eventDispatcher.loadBattleQueue() else: g_eventDispatcher.loadHangar() g_eventDispatcher.loadSquad(isInvitesOpen=isCreationCtx and not accountsToInvite, isReady=self.__isTeamRead()) g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED, self.__handleCarouselInited, scope=EVENT_BUS_SCOPE.LOBBY) result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW) result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE) g_eventDispatcher.updateUI() if accountsToInvite: self.request(SendInvitesCtx(accountsToInvite, '')) return result
def executeInit(self, ctx): initResult = FUNCTIONAL_INIT_RESULT.UNDEFINED if self._functional.getPlayerInfo( ).isReady and self._functional.getFlags().isInQueue(): g_eventDispatcher.loadBattleQueue() initResult = FUNCTIONAL_INIT_RESULT.LOAD_PAGE squadCtx = None if ctx is not None: isCreationCtx = ctx.getRequestType() is REQUEST_TYPE.CREATE if isCreationCtx: accountsToInvite = ctx.getAccountsToInvite() showInvitesWindow = True if accountsToInvite: showInvitesWindow = False self._functional.request( SendInvitesCtx(accountsToInvite, '')) squadCtx = {'showInvitesWindow': showInvitesWindow} g_eventDispatcher.loadSquad(squadCtx, self.__getTeamReady()) return initResult
def _loadWindow(self, ctx): g_eventDispatcher.loadSquad(ctx, self._getTeamReady())
def showGUI(self): g_eventDispatcher.loadSquad()
def _loadWindow(self, ctx): prbType = self._entity.getEntityType() g_eventDispatcher.loadSquad(prbType, ctx, self._getTeamReady())