def _doActivate(self): from bootcamp.Bootcamp import g_bootcamp from gui.battle_results.context import RequestResultsContext from bootcamp.BattleResultTransition import BattleResultTransition from gui.shared.personality import ServicesLocator sessionProvider = dependency.instance(IBattleSessionProvider) battleResultProvider = dependency.instance(IBattleResultsService) battleCtx = sessionProvider.getCtx() g_bootcamp.showActionWaitWindow() yield ServicesLocator.itemsCache.update(CACHE_SYNC_REASON.SHOW_GUI) g_bootcamp.hideActionWaitWindow() resultType, _, _, _, _ = g_bootcamp.getBattleResults() if resultType == BOOTCAMP_BATTLE_RESULT_MESSAGE.FAILURE: BootcampTransition.stop() g_bootcampEvents.onResultScreenFinished(0) return else: if battleCtx.lastArenaUniqueID: if g_bootcamp.transitionFlash is not None: g_bootcamp.transitionFlash.close() g_bootcamp.transitionFlash = BattleResultTransition() g_bootcamp.transitionFlash.active(True) yield battleResultProvider.requestResults( RequestResultsContext(battleCtx.lastArenaUniqueID)) battleCtx.lastArenaUniqueID = None return
def onBecomePlayer(self): replayCtrl = BattleReplay.g_replayCtrl if replayCtrl.isRecording: replayCtrl.stop() super(PlayerBootcampAccount, self).onBecomePlayer() if g_bootcamp is not None: g_bootcamp.setAccount(self) g_bootcampEvents.onBootcampBecomePlayer() g_bootcamp.showActionWaitWindow() return
def showActionWaitWindow(self): g_bootcamp.showActionWaitWindow()