コード例 #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
ファイル: training.py プロジェクト: Infernux/Projects
    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
ファイル: company.py プロジェクト: wotmods/WOTDecompiled
 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
ファイル: training.py プロジェクト: jamesxia4/wot_client
    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
ファイル: random_queue.py プロジェクト: kblw/wot_client
 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
ファイル: company.py プロジェクト: wotmods/WOTDecompiled
 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
ファイル: training.py プロジェクト: jamesxia4/wot_client
 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
ファイル: historical.py プロジェクト: webiumsk/WoT
 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
ファイル: company.py プロジェクト: jamesxia4/wot_client
 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
ファイル: event_squad.py プロジェクト: Infernux/Projects
 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
ファイル: company.py プロジェクト: jamesxia4/wot_client
 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
ファイル: historical.py プロジェクト: jamesxia4/wot_client
 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
ファイル: training.py プロジェクト: Infernux/Projects
 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