Пример #1
0
 def init(self, clientPrb = None, ctx = None):
     result = super(BattleSessionFunctional, self).init(clientPrb=clientPrb)
     g_eventDispatcher.loadHangar()
     g_eventDispatcher.loadBattleSessionWindow(self.getPrbType())
     result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW)
     result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED, self.__handleCarouselInited, scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventDispatcher.updateUI()
     return result
Пример #2
0
    def init(self, clientPrb = None, ctx = None):
        result = super(TrainingFunctional, self).init(clientPrb=clientPrb)
        add = g_eventBus.addListener
        for event in self.__loadEvents:
            add(event, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY)

        self.__enterTrainingRoom()
        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()
        return result
Пример #3
0
 def init(self, clientPrb = None, ctx = None):
     result = super(CompanyFunctional, self).init(clientPrb=clientPrb)
     playerInfo = self.getPlayerInfo()
     if self.getTeamState(team=1).isInQueue() and playerInfo.isReady() and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
         g_eventDispatcher.loadBattleQueue()
     else:
         g_eventDispatcher.loadHangar()
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW)
     result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED, self.__handleCarouselInited, scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventDispatcher.updateUI()
     return result
Пример #4
0
    def init(self, clientPrb=None, ctx=None):
        result = super(TrainingFunctional, self).init(clientPrb=clientPrb)
        add = g_eventBus.addListener
        for event in self.__loadEvents:
            add(event, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY)

        self.__enterTrainingRoom()
        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()
        return result
Пример #5
0
 def init(self, clientPrb=None, ctx=None):
     result = super(BattleSessionFunctional, self).init(clientPrb=clientPrb)
     g_eventDispatcher.loadHangar()
     g_eventDispatcher.loadBattleSessionWindow(self.getPrbType())
     result = FUNCTIONAL_INIT_RESULT.addIfNot(
         result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW)
     result = FUNCTIONAL_INIT_RESULT.addIfNot(
         result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED,
                            self.__handleCarouselInited,
                            scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventDispatcher.updateUI()
     return result
Пример #6
0
 def init(self, ctx = None):
     result = super(RandomQueueFunctional, self).init(ctx)
     g_gameCtrl.captcha.onCaptchaInputCanceled += self.onCaptchaInputCanceled
     if self.isInQueue():
         g_eventDispatcher.loadBattleQueue()
         result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE)
     return result
Пример #7
0
 def init(self, ctx = None):
     result = super(EventBattlesQueueFunctional, self).init(ctx)
     g_gameCtrl.captcha.onCaptchaInputCanceled += self.onCaptchaInputCanceled
     if self.isInQueue():
         g_eventDispatcher.loadBattleQueue()
         result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE)
     return result
Пример #8
0
 def init(self, clientPrb = None, ctx = None):
     result = super(CompanyIntroFunctional, self).init()
     self._rosterReq.start(self._onPrbRosterReceived)
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW)
     g_eventDispatcher.updateUI()
     return result
Пример #9
0
 def init(self, clientPrb=None, ctx=None):
     result = super(TrainingIntroFunctional, self).init()
     g_eventDispatcher.loadTrainingList()
     result = FUNCTIONAL_INIT_RESULT.addIfNot(
         result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE)
     g_eventDispatcher.updateUI()
     return result
Пример #10
0
 def init(self, ctx = None):
     result = super(HistoricalQueueFunctional, self).init(ctx=ctx)
     g_eventDispatcher.loadHistoryBattles()
     g_eventsCache.onSyncCompleted += self.onEventsCacheResync
     g_eventBus.addListener(events.ChannelCarouselEvent.CAROUSEL_INITED, self.__handleCarouselInited, scope=EVENT_BUS_SCOPE.LOBBY)
     g_gameCtrl.captcha.onCaptchaInputCanceled += self.onCaptchaInputCanceled
     result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW)
     return result
Пример #11
0
 def init(self, clientPrb=None, ctx=None):
     result = super(CompanyIntroFunctional, self).init()
     self._rosterReq.start(self._onPrbRosterReceived)
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_INIT_RESULT.addIfNot(
         result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW)
     g_eventDispatcher.updateUI()
     g_eventsCache.companies.onCompanyStateChanged += self.onCompanyStateChanged
     return result
Пример #12
0
 def init(self, clientPrb = None, ctx = None):
     result = super(EventSquadFunctional, 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.loadEventSquad(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
Пример #13
0
 def init(self, clientPrb=None, ctx=None):
     result = super(CompanyFunctional, self).init(clientPrb=clientPrb)
     playerInfo = self.getPlayerInfo()
     if self.getTeamState(team=1).isInQueue() and playerInfo.isReady(
     ) and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
         g_eventDispatcher.loadBattleQueue()
     else:
         g_eventDispatcher.loadHangar()
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_INIT_RESULT.addIfNot(
         result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW)
     result = FUNCTIONAL_INIT_RESULT.addIfNot(
         result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED,
                            self.__handleCarouselInited,
                            scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventDispatcher.updateUI()
     g_eventsCache.companies.onCompanyStateChanged += self.onCompanyStateChanged
     return result
Пример #14
0
 def init(self, ctx=None):
     result = super(HistoricalQueueFunctional, self).init(ctx=ctx)
     g_eventDispatcher.loadHistoryBattles()
     g_eventsCache.onSyncCompleted += self.onEventsCacheResync
     g_eventBus.addListener(events.ChannelCarouselEvent.CAROUSEL_INITED,
                            self.__handleCarouselInited,
                            scope=EVENT_BUS_SCOPE.LOBBY)
     g_gameCtrl.captcha.onCaptchaInputCanceled += self.onCaptchaInputCanceled
     result = FUNCTIONAL_INIT_RESULT.addIfNot(
         result, FUNCTIONAL_INIT_RESULT.LOAD_WINDOW)
     return result
Пример #15
0
 def init(self, clientPrb = None, ctx = None):
     result = super(TrainingIntroFunctional, self).init()
     g_eventDispatcher.loadTrainingList()
     result = FUNCTIONAL_INIT_RESULT.addIfNot(result, FUNCTIONAL_INIT_RESULT.LOAD_PAGE)
     g_eventDispatcher.updateUI()
     return result