コード例 #1
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
コード例 #2
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
コード例 #3
0
ファイル: event_squad.py プロジェクト: Infernux/Projects
 def prb_onTeamStatesReceived(self):
     super(EventSquadFunctional, self).prb_onTeamStatesReceived()
     g_eventDispatcher.updateUI()
     if self.getPlayerInfo().isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue():
             g_eventDispatcher.loadBattleQueue()
         else:
             g_eventDispatcher.loadHangar()
コード例 #4
0
ファイル: functionalcompany.py プロジェクト: aevitas/wotsdk
 def prb_onTeamStatesReceived(self):
     super(CompanyFunctional, self).prb_onTeamStatesReceived()
     g_eventDispatcher.updateUI()
     playerInfo = self.getPlayerInfo()
     if playerInfo.isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue() and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
             g_eventDispatcher.loadBattleQueue()
         else:
             g_eventDispatcher.loadHangar()
コード例 #5
0
ファイル: company.py プロジェクト: jamesxia4/wot_client
 def prb_onTeamStatesReceived(self):
     super(CompanyFunctional, self).prb_onTeamStatesReceived()
     g_eventDispatcher.updateUI()
     playerInfo = self.getPlayerInfo()
     if playerInfo.isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue(
         ) and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
             g_eventDispatcher.loadBattleQueue()
         else:
             g_eventDispatcher.loadHangar()
コード例 #6
0
 def init(self, ctx=None):
     self.storage.release()
     if ctx is not None:
         initCtx = ctx.getInitCtx()
         fromEventSquad = isinstance(initCtx, EventSquadSettingsCtx)
         if not fromEventSquad or not initCtx.getKeepCurrentView():
             if self.getPlayerInfo().isReady and self.getFlags().isInQueue():
                 g_eventDispatcher.loadBattleQueue()
             else:
                 g_eventDispatcher.loadHangar()
     return super(EventBattleSquadEntity, self).init(ctx)
コード例 #7
0
 def setUnitChanged(self, loadHangar=False):
     flags = self._entity.getFlags()
     if self._entity.getPlayerInfo().isReady and flags.isInQueue():
         _, unit = self._entity.getUnit()
         pInfo = self._entity.getPlayerInfo()
         vInfos = unit.getMemberVehicles(pInfo.dbID)
         if vInfos is not None:
             g_currentVehicle.selectVehicle(vInfos[0].vehInvID)
         g_eventDispatcher.loadBattleQueue()
     elif loadHangar:
         g_eventDispatcher.loadHangar()
     return
コード例 #8
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
コード例 #9
0
 def init(self, clientPrb=None, ctx=None):
     result = super(CompanyEntity, self).init(clientPrb=clientPrb, ctx=ctx)
     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_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED,
                            self.__handleCarouselInited,
                            scope=EVENT_BUS_SCOPE.LOBBY)
     self.eventsCache.companies.onCompanyStateChanged += self.__onCompanyStateChanged
     return result
コード例 #10
0
ファイル: action_handlers.py プロジェクト: kblw/wot_client
 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
コード例 #11
0
 def executeInit(self, ctx):
     initResult = FUNCTIONAL_FLAG.UNDEFINED
     if self._entity.getPlayerInfo().isReady and self._entity.getFlags().isInQueue():
         g_eventDispatcher.loadBattleQueue()
         initResult = FUNCTIONAL_FLAG.LOAD_PAGE
     squadCtx = None
     if ctx is not None:
         initCtx = ctx.getInitCtx()
         if initCtx is not None and initCtx.getRequestType() is REQUEST_TYPE.CREATE:
             accountsToInvite = initCtx.getAccountsToInvite()
             showInvitesWindow = True
             if accountsToInvite:
                 showInvitesWindow = False
                 self.processInvites(accountsToInvite)
             squadCtx = {'showInvitesWindow': showInvitesWindow}
     self._loadWindow(squadCtx)
     return initResult
コード例 #12
0
 def executeInit(self, ctx):
     initResult = FUNCTIONAL_FLAG.UNDEFINED
     if self._functional.getPlayerInfo().isReady and self._functional.getFlags().isInQueue():
         g_eventDispatcher.loadBattleQueue()
         initResult = FUNCTIONAL_FLAG.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, ""))
                 self._showInviteSentMessage(accountsToInvite)
             squadCtx = {"showInvitesWindow": showInvitesWindow}
     self._loadWindow(squadCtx)
     return initResult
コード例 #13
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
コード例 #14
0
 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
コード例 #15
0
ファイル: historical.py プロジェクト: webiumsk/WoT
 def onEnqueued(self, *args):
     super(HistoricalQueueFunctional, self).onEnqueued(*args)
     self.__requestCtx.stopProcessing(True)
     g_eventDispatcher.loadBattleQueue()
     g_eventDispatcher.updateUI()
コード例 #16
0
 def setUnitChanged(self):
     flags = self._entity.getFlags()
     if self._entity.getPlayerInfo().isReady and flags.isInQueue():
         g_eventDispatcher.loadBattleQueue()
     else:
         g_eventDispatcher.loadHangar()
コード例 #17
0
ファイル: functionalrandom.py プロジェクト: Difrex/wotsdk
 def _goToQueueUI(self):
     g_eventDispatcher.loadBattleQueue()
     return FUNCTIONAL_FLAG.LOAD_PAGE
コード例 #18
0
ファイル: event_battles.py プロジェクト: webiumsk/WOT-0.9.12
 def _goToQueueUI(self):
     g_eventDispatcher.loadBattleQueue()
     return FUNCTIONAL_FLAG.LOAD_PAGE
コード例 #19
0
ファイル: historical.py プロジェクト: jamesxia4/wot_client
 def onEnqueued(self, *args):
     super(HistoricalQueueFunctional, self).onEnqueued(*args)
     self.__requestCtx.stopProcessing(True)
     g_eventDispatcher.loadBattleQueue()
     g_eventDispatcher.updateUI()
コード例 #20
0
ファイル: random_queue.py プロジェクト: kblw/wot_client
 def onEnqueued(self):
     super(RandomQueueFunctional, self).onEnqueued()
     self.__requestCtx.stopProcessing(True)
     g_eventDispatcher.loadBattleQueue()
     g_eventDispatcher.updateUI()
コード例 #21
0
 def setUnitChanged(self, flags):
     if flags.isInQueueChanged():
         if self._functional.getPlayerInfo().isReady and flags.isInQueue():
             g_eventDispatcher.loadBattleQueue()
         else:
             g_eventDispatcher.loadHangar()
コード例 #22
0
 def setUnitChanged(self, flags):
     if flags.isInQueueChanged():
         if self._functional.getPlayerInfo().isReady and flags.isInQueue():
             g_eventDispatcher.loadBattleQueue()
         else:
             g_eventDispatcher.loadHangar()
コード例 #23
0
 def setUnitChanged(self, data = None):
     if self._functional.getPlayerInfo().isReady and self._functional.getFlags().isInQueue():
         g_eventDispatcher.loadBattleQueue()
     else:
         g_eventDispatcher.loadHangar()
コード例 #24
0
 def onEnqueued(self):
     super(EventBattlesQueueFunctional, self).onEnqueued()
     self.__requestCtx.stopProcessing(True)
     g_eventDispatcher.loadBattleQueue()
     g_eventDispatcher.updateUI()