Beispiel #1
0
 def updateTrainingRoom(self, arena, roundLength, isPrivate, comment):
     if self.__isCreateRequest:
         settings = TrainingSettingsCtx(isRequestToCreate=True)
     else:
         settings = TrainingSettingsCtx(isRequestToCreate=False)
     settings.setArenaTypeID(arena)
     settings.setRoundLen(roundLength * 60)
     settings.setOpened(not isPrivate)
     settings.setComment(comment)
     self.fireEvent(events.TrainingSettingsEvent(events.TrainingSettingsEvent.UPDATE_TRAINING_SETTINGS, ctx={'settings': settings}), scope=EVENT_BUS_SCOPE.LOBBY)
Beispiel #2
0
 def updateTrainingRoom(self, arena, roundLength, isPrivate, comment):
     self.__settings.setArenaTypeID(arena)
     self.__settings.setRoundLen(roundLength * 60)
     self.__settings.setOpened(not isPrivate)
     self.__settings.setComment(comment)
     if self.__isEpic:
         eventType = events.TrainingSettingsEvent.UPDATE_EPIC_TRAINING_SETTINGS
     else:
         eventType = events.TrainingSettingsEvent.UPDATE_TRAINING_SETTINGS
     self.fireEvent(events.TrainingSettingsEvent(eventType, ctx={'settings': self.__settings}), scope=EVENT_BUS_SCOPE.LOBBY)
Beispiel #3
0
 def createTrainingRequest(self):
     settings = EpicTrainingSettingsCtx()
     gameplayID = ArenaType.getGameplayIDForName('epic')
     geometryID = 96
     arenaTypeID = geometryID | gameplayID << 16
     settings.setArenaTypeID(arenaTypeID)
     settings.setRoundLen(190)
     settings.setOpened(True)
     settings._isRequestToCreate = True
     self.fireEvent(events.TrainingSettingsEvent(
         events.TrainingSettingsEvent.UPDATE_EPIC_TRAINING_SETTINGS,
         ctx={'settings': settings}),
                    scope=EVENT_BUS_SCOPE.LOBBY)