コード例 #1
0
 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())
コード例 #2
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
コード例 #3
0
ファイル: squad.py プロジェクト: webiumsk/WoT
 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
コード例 #4
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
コード例 #5
0
 def _loadWindow(self, ctx):
     g_eventDispatcher.loadSquad(ctx, self._getTeamReady())
コード例 #6
0
ファイル: squad.py プロジェクト: webiumsk/WoT
 def showGUI(self):
     g_eventDispatcher.loadSquad()
コード例 #7
0
 def _loadWindow(self, ctx):
     prbType = self._entity.getEntityType()
     g_eventDispatcher.loadSquad(prbType, ctx, self._getTeamReady())
コード例 #8
0
 def _loadWindow(self, ctx):
     g_eventDispatcher.loadSquad(ctx, self._getTeamReady())