Ejemplo n.º 1
0
 def __createDefaultByStorage(self, ctx):
     if self.pveStorage.isModeSelected():
         return SandboxEntity()
     elif self.rankedStorage.isModeSelected():
         return RankedEntity()
     else:
         return EpicEntity() if self.epicStorage.isModeSelected() else None
Ejemplo n.º 2
0
 def __createDefaultByStorage(self, ctx):
     """
     Tries to create default entity for prequeue by storage.
     Args:
         ctx: creation request context.
     
     Returns:
         new prebattle prequeue entity
     """
     if self.falloutStorage.isModeSelected():
         return falloutQueueTypeFactory(self.falloutStorage.getBattleType())
     elif self.pveStorage.isModeSelected():
         return SandboxEntity()
     else:
         return None
Ejemplo n.º 3
0
 def __createDefaultByStorage(self, ctx):
     if self.pveStorage.isModeSelected():
         return SandboxEntity()
     elif self.rankedStorage.isModeSelected():
         return RankedEntity()
     elif self.epicStorage.isModeSelected():
         return EpicEntity()
     elif self.battleRoyaleStorage.isModeSelected():
         return br_entity.BattleRoyaleEntity()
     elif self.mapboxStorage.isModeSelected():
         return MapboxEntity()
     elif self.mapsTrainingStorage.isModeSelected():
         return MapsTrainingEntity()
     else:
         return EventBattleEntity(
         ) if self.eventBattlesStorage.isModeSelected() else None
 def __createDefaultEntity(self):
     if prb_getters.isInBootcampAccount():
         return BootcampEntity()
     if self.pveStorage.isModeSelected():
         return SandboxEntity()
     if self.rankedStorage.isModeSelected():
         return RankedEntity()
     if self.epicStorage.isModeSelected():
         return EpicEntity()
     if self.battleRoyaleStorage.isModeSelected():
         return self.__createByQueueType(QUEUE_TYPE.BATTLE_ROYALE)
     if self.mapboxStorage.isModeSelected():
         return MapboxEntity()
     if self.mapsTrainingStorage.isModeSelected():
         return MapsTrainingEntity()
     if self.eventBattlesStorage.isModeSelected():
         return EventBattleEntity()
     if self.funRandomStorage.isModeSelected():
         return FunRandomEntity()
     prbEntity = self.__createByQueueType(self.recentArenaStorage.queueType)
     return prbEntity if prbEntity else RandomEntity()