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())
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())
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)
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())
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())
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)
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())
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)
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)
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()
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())
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)
def _showWindow(self): g_eventDispatcher.showUnitWindow(self._prbType)
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)
def _showWindow(self): pInfo = self._unitFunc.getPlayerInfo() if pInfo.isInSlot and not pInfo.isReady: g_eventDispatcher.showUnitWindow(self._unitFunc.getEntityType())
def _showWindow(self): pInfo = self._unitFunc.getPlayerInfo() if pInfo.isInSlot and not pInfo.isReady: g_eventDispatcher.showUnitWindow(self._unitFunc.getEntityType())