Esempio n. 1
0
 def doSelectAction(self, action):
     if action.actionName == PREBATTLE_ACTION_NAME.BATTLE_TUTORIAL:
         g_eventDispatcher.startOffbattleTutorial()
         result = SelectResult(True, None)
     else:
         result = SelectResult(False, None)
     return result
Esempio n. 2
0
 def doSelectAction(self, action):
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.EPIC:
         return SelectResult(True)
     return SelectResult(
         True, EpicSquadEntryPoint(accountsToInvite=action.accountsToInvite)
     ) if name == PREBATTLE_ACTION_NAME.SQUAD else super(
         EpicEntity, self).doSelectAction(action)
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)
     if name == PREBATTLE_ACTION_NAME.RANDOM:
         g_eventDispatcher.showUnitWindow(self._prbType)
         return SelectResult(True)
     return super(RandomSquadEntity, self).doSelectAction(action)
Esempio n. 4
0
 def doSelectAction(self, action):
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.SQUAD:
         return SelectResult(
             True,
             FalloutSquadEntryPoint(
                 self.storage.getBattleType(),
                 accountsToInvite=action.accountsToInvite))
     if name == PREBATTLE_ACTION_NAME.FALLOUT:
         g_eventDispatcher.showFalloutWindow()
         return SelectResult(True)
     return super(_FalloutEntity, self).doSelectAction(action)
Esempio n. 5
0
    def doSelectAction(self, action):
        result = SelectResult()
        for item in self.__items.itervalues():
            if item and item.hasEntity():
                result = item.doSelectAction(action)
                break

        return result
 def doSelectAction(self, action):
     name = action.actionName
     if name in (PREBATTLE_ACTION_NAME.EVENT_SQUAD, PREBATTLE_ACTION_NAME.EVENT_BATTLE):
         g_eventDispatcher.showUnitWindow(self._prbType)
         if action.accountsToInvite:
             self._actionsHandler.processInvites(action.accountsToInvite)
         return SelectResult(True)
     return super(EventBattleSquadEntity, self).doSelectAction(action)
Esempio n. 7
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)
Esempio n. 8
0
 def doSelectAction(self, action):
     """
     Processes action come from GUI selector to switch to another mode.
     Args:
         action: prebattle select action
     
     Returns:
         select result object
     """
     return SelectResult()
Esempio n. 9
0
 def doSelectAction(self, action):
     isProcessed = False
     newEntry = None
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.SQUAD:
         newEntry = unit.SquadEntry(
             accountsToInvite=action.accountsToInvite)
         isProcessed = True
     elif name == PREBATTLE_ACTION_NAME.EVENT_SQUAD:
         newEntry = unit.EventSquadEntry(
             accountsToInvite=action.accountsToInvite)
         isProcessed = True
     elif name == PREBATTLE_ACTION_NAME.RANDOM_QUEUE:
         isProcessed = True
     return SelectResult(isProcessed, newEntry)
Esempio n. 10
0
 def doSelectAction(self, action):
     isProcessed = False
     newEntry = None
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.SQUAD:
         newEntry = unit.FalloutSquadEntry(
             self.storage.getBattleType(),
             accountsToInvite=action.accountsToInvite)
         isProcessed = True
     if name == PREBATTLE_ACTION_NAME.FALLOUT:
         g_eventDispatcher.showFalloutWindow()
         isProcessed = True
     elif name == PREBATTLE_ACTION_NAME.FALLOUT_CLASSIC and self._queueType == QUEUE_TYPE.FALLOUT_CLASSIC or name == PREBATTLE_ACTION_NAME.FALLOUT_MULTITEAM and self._queueType == QUEUE_TYPE.FALLOUT_MULTITEAM:
         isProcessed = True
     elif name == PREBATTLE_ACTION_NAME.FALLOUT_QUEUE:
         isProcessed = True
     return SelectResult(isProcessed, newEntry)
Esempio n. 11
0
 def doSelectAction(self, action):
     if action.actionName == PREBATTLE_ACTION_NAME.EPIC_TRAINING_LIST:
         g_eventDispatcher.loadEpicTrainingList()
         return SelectResult(True)
     return super(EpicBattleTrainingIntroEntity,
                  self).doSelectAction(action)
Esempio n. 12
0
 def doSelectAction(self, action):
     return SelectResult(
         True, None
     ) if action.actionName == PREBATTLE_ACTION_NAME.FUN_RANDOM else super(
         FunRandomEntity, self).doSelectAction(action)
Esempio n. 13
0
 def __init__(self):
     super(_PointcutPrbDisableEntitySelect, self).__init__(
         'gui.prb_control.entities.bootcamp.pre_queue.entity',
         'BootcampEntity',
         'doSelectAction',
         aspects=(common.AspectAvoidWithConstantRet(SelectResult(True)), ))
Esempio n. 14
0
 def doSelectAction(self, action):
     if action.actionName == PREBATTLE_ACTION_NAME.SPEC_BATTLES_LIST:
         g_eventDispatcher.showBattleSessionWindow()
         return SelectResult(True)
     return super(BattleSessionEntity, self).doSelectAction(action)
Esempio n. 15
0
 def doSelectAction(self, action):
     name = action.actionName
     if name in (PREBATTLE_ACTION_NAME.RANKED,
                 PREBATTLE_ACTION_NAME.RANKED_FORCED):
         return SelectResult(True)
     return super(RankedEntity, self).doSelectAction(action)
Esempio n. 16
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. 17
0
 def doSelectAction(self, action):
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.RANDOM:
         return SelectResult(True)
     return super(RandomEntity, self).doSelectAction(action)
Esempio n. 18
0
 def doSelectAction(self, action):
     return SelectResult(True) if action.actionName == PREBATTLE_ACTION_NAME.MAPS_TRAINING else super(MapsTrainingEntity, self).doSelectAction(action)
Esempio n. 19
0
 def doSelectAction(self, action):
     if action.actionName == PREBATTLE_ACTION_NAME.SANDBOX:
         SelectResult(True)
     return super(SandboxEntity, self).doSelectAction(action)
Esempio n. 20
0
 def doSelectAction(self, action):
     return SelectResult(
         True
     ) if action.actionName == PREBATTLE_ACTION_NAME.EVENT_BATTLE else super(
         EventBattleEntity, self).doSelectAction(action)
Esempio n. 21
0
 def doSelectAction(self, action):
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.FALLOUT_CLASSIC:
         return SelectResult(True)
     return super(FalloutClassicEntity, self).doSelectAction(action)
Esempio n. 22
0
 def doSelectAction(self, action):
     if action.actionName == PREBATTLE_ACTION_NAME.EPIC_TRAINING_LIST:
         self.__enterTrainingRoom()
         return SelectResult(True)
     return super(EpicBattleTrainingEntity, self).doSelectAction(action)
Esempio n. 23
0
 def doSelectAction(self, action):
     isProcessed = False
     if action.actionName == PREBATTLE_ACTION_NAME.SANDBOX:
         isProcessed = True
     return SelectResult(isProcessed, None)
Esempio n. 24
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. 25
0
 def doSelectAction(self, action):
     return SelectResult()
Esempio n. 26
0
 def doSelectAction(self, action):
     result = False
     if action.actionName == PREBATTLE_ACTION_NAME.COMPANY:
         g_eventDispatcher.loadCompany()
         result = True
     return SelectResult(result, None)
Esempio n. 27
0
 def doSelectAction(self, action):
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.STRONGHOLD:
         g_eventDispatcher.showStrongholdsWindow()
         SelectResult(True)
     return super(StrongholdEntity, self).doSelectAction(action)
Esempio n. 28
0
 def doSelectAction(self, action):
     name = action.actionName
     if name == PREBATTLE_ACTION_NAME.FALLOUT_MULTITEAM:
         return SelectResult(True)
     return super(FalloutMultiTeamEntity, self).doSelectAction(action)
 def doSelectAction(self, action):
     return SelectResult(
         True
     ) if action.actionName == PREBATTLE_ACTION_NAME.BOOTCAMP else super(
         BootcampEntity, self).doSelectAction(action)
 def doSelectAction(self, action):
     name = action.actionName
     return SelectResult(
         True) if name == PREBATTLE_ACTION_NAME.MAPBOX else super(
             MapboxEntity, self).doSelectAction(action)