Esempio n. 1
0
 def _showWindow(self):
     """
     Shows fort battle unit window
     """
     pInfo = self._entity.getPlayerInfo()
     if pInfo.isInSlot and not pInfo.isReady:
         g_eventDispatcher.showUnitWindow(self._entity.getEntityType())
Esempio n. 2
0
 def pe_onEnqueuedUnitAssembler(self):
     self.__isInSearch = True
     self.__startSearchTime = BigWorld.time()
     g_eventDispatcher.setUnitProgressInCarousel(self.__functional.getEntityType(), True)
     for listener in self.__functional.getListenersIterator():
         listener.onUnitAutoSearchStarted(0)
     else:
         g_eventDispatcher.showUnitWindow(self.__functional.getEntityType())
Esempio n. 3
0
 def doSelectAction(self, action):
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.SQUAD:
         g_eventDispatcher.showUnitWindow(self._prbType)
         if action.accountsToInvite:
             self._actionsHandler.processInvites(action.accountsToInvite)
         return SelectResult(True)
     return super(EpicSquadEntity, self).doSelectAction(action)
Esempio n. 4
0
 def pe_onEnqueuedUnitAssembler(self):
     self.__isInSearch = True
     self.__startSearchTime = BigWorld.time()
     g_eventDispatcher.setUnitProgressInCarousel(
         self.__functional.getEntityType(), True)
     for listener in self.__functional.getListenersIterator():
         listener.onUnitAutoSearchStarted(0)
     else:
         g_eventDispatcher.showUnitWindow(self.__functional.getEntityType())
Esempio n. 5
0
 def unitBrowser_onSearchSuccessReceived(self, unitMgrID, acceptDeadlineUTC):
     self.__hasResult = True
     acceptDelta = self.getAcceptDelta(acceptDeadlineUTC)
     LOG_DEBUG('onUnitAutoSearchSuccess', acceptDelta, acceptDeadlineUTC)
     g_eventDispatcher.setUnitProgressInCarousel(self.__functional.getEntityType(), False)
     for listener in self.__functional.getListenersIterator():
         listener.onUnitAutoSearchSuccess(acceptDelta)
     else:
         g_eventDispatcher.showUnitWindow(self.__functional.getEntityType())
Esempio n. 6
0
 def __exitFromQueue(self):
     self.__isInSearch = False
     self.__lastErrorCode = UNIT_ERROR.OK
     self.__hasResult = False
     self.__startSearchTime = 0
     prbType = self.__functional.getEntityType()
     g_eventDispatcher.setUnitProgressInCarousel(prbType, False)
     for listener in self.__functional.getListenersIterator():
         listener.onUnitAutoSearchFinished()
     else:
         g_eventDispatcher.showUnitWindow(prbType)
Esempio n. 7
0
 def unitBrowser_onSearchSuccessReceived(self, unitMgrID,
                                         acceptDeadlineUTC):
     self.__hasResult = True
     acceptDelta = self.getAcceptDelta(acceptDeadlineUTC)
     LOG_DEBUG('onUnitAutoSearchSuccess', acceptDelta, acceptDeadlineUTC)
     g_eventDispatcher.setUnitProgressInCarousel(
         self.__functional.getEntityType(), False)
     for listener in self.__functional.getListenersIterator():
         listener.onUnitAutoSearchSuccess(acceptDelta)
     else:
         g_eventDispatcher.showUnitWindow(self.__functional.getEntityType())
Esempio n. 8
0
 def __exitFromQueue(self):
     self.__isInSearch = False
     self.__lastErrorCode = UNIT_ERROR.OK
     self.__hasResult = False
     self.__startSearchTime = 0
     prbType = self.__functional.getEntityType()
     g_eventDispatcher.setUnitProgressInCarousel(prbType, False)
     for listener in self.__functional.getListenersIterator():
         listener.onUnitAutoSearchFinished()
     else:
         g_eventDispatcher.showUnitWindow(prbType)
Esempio n. 9
0
 def __exitFromQueue(self):
     """
     Routine clears all information that is related to in search state
     """
     self.__isInSearch = False
     self.__lastErrorCode = UNIT_ERROR.OK
     self.__hasResult = False
     self.__startSearchTime = 0
     prbType = self.__entity.getEntityType()
     g_eventDispatcher.setUnitProgressInCarousel(prbType, False)
     for listener in self.__entity.getListenersIterator():
         listener.onUnitAutoSearchFinished()
     else:
         g_eventDispatcher.showUnitWindow(prbType)
Esempio n. 10
0
    def unitBrowser_onSearchSuccessReceived(self, unitMgrID, acceptDeadlineUTC):
        """
        Listener for auto search succeed event
        Args:
            unitMgrID: unit manager ID
            acceptDeadlineUTC: time when approval will expire
        """
        self.__hasResult = True
        acceptDelta = self.getAcceptDelta(acceptDeadlineUTC)
        LOG_DEBUG('onUnitAutoSearchSuccess', acceptDelta, acceptDeadlineUTC)
        g_eventDispatcher.setUnitProgressInCarousel(self.__entity.getEntityType(), False)
        for listener in self.__entity.getListenersIterator():
            listener.onUnitAutoSearchSuccess(acceptDelta)
        else:
            g_eventDispatcher.showUnitWindow(self.__entity.getEntityType())

        g_eventDispatcher.updateUI()
Esempio n. 11
0
 def doSelectAction(self, action):
     name = action.actionName
     if name == _PAN.SQUAD:
         g_eventDispatcher.showUnitWindow(self._prbType)
         return SelectResult(True)
     if name == _PAN.FALLOUT:
         g_eventDispatcher.showFalloutWindow()
         return SelectResult(True)
     if name in (_PAN.FALLOUT_CLASSIC, _PAN.FALLOUT_MULTITEAM):
         rosterType = self.getRosterType()
         if name == _PAN.FALLOUT_CLASSIC and rosterType != ROSTER_TYPE.FALLOUT_CLASSIC_ROSTER:
             ctx = ChangeFalloutQueueTypeCtx(QUEUE_TYPE.FALLOUT_CLASSIC, 'prebattle/change_settings')
             self.changeFalloutQueueType(ctx)
         if name == _PAN.FALLOUT_MULTITEAM and rosterType != ROSTER_TYPE.FALLOUT_MULTITEAM_ROSTER:
             ctx = ChangeFalloutQueueTypeCtx(QUEUE_TYPE.FALLOUT_MULTITEAM, 'prebattle/change_settings')
             self.changeFalloutQueueType(ctx)
         return SelectResult(True)
     return super(FalloutSquadEntity, self).doSelectAction(action)
 def showGUI(self):
     g_eventDispatcher.showUnitWindow(self._entity.getEntityType())
Esempio n. 13
0
 def doSelectAction(self, action):
     actionName = action.actionName
     if actionName == PREBATTLE_ACTION_NAME.E_SPORT:
         g_eventDispatcher.showUnitWindow(self._prbType)
         return SelectResult(True)
     return super(ESportIntroEntity, self).doSelectAction(action)
Esempio n. 14
0
 def _showWindow(self):
     g_eventDispatcher.showUnitWindow(self._prbType)
Esempio n. 15
0
 def doSelectAction(self, action):
     name = action.actionName
     if name in (PREBATTLE_ACTION_NAME.SQUAD, PREBATTLE_ACTION_NAME.RANDOM):
         g_eventDispatcher.showUnitWindow(self._prbType)
         return SelectResult(True)
     return super(EventBattleSquadEntity, self).doSelectAction(action)
Esempio n. 16
0
 def _showWindow(self):
     pInfo = self._unitFunc.getPlayerInfo()
     if pInfo.isInSlot and not pInfo.isReady:
         g_eventDispatcher.showUnitWindow(self._unitFunc.getEntityType())
Esempio n. 17
0
 def _showWindow(self):
     pInfo = self._unitFunc.getPlayerInfo()
     if pInfo.isInSlot and not pInfo.isReady:
         g_eventDispatcher.showUnitWindow(self._unitFunc.getEntityType())