Пример #1
0
 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()
     if g_bootcamp.transitionFlash is not None:
         g_bootcamp.transitionFlash.close()
     g_bootcamp.transitionFlash = BattleResultTransition()
     g_bootcamp.transitionFlash.active(True)
     yield ServicesLocator.itemsCache.update(CACHE_SYNC_REASON.SHOW_GUI)
     resultType = g_bootcamp.getBattleResults().type
     if resultType == BOOTCAMP_BATTLE_RESULT_MESSAGE.FAILURE:
         g_bootcampEvents.onResultScreenFinished()
         g_bootcamp.transitionFlash.active(False)
         g_bootcamp.transitionFlash.close()
         g_bootcamp.transitionFlash = None
         return
     else:
         if battleCtx.lastArenaUniqueID:
             yield battleResultProvider.requestResults(
                 RequestResultsContext(battleCtx.lastArenaUniqueID))
             battleCtx.lastArenaUniqueID = None
         return
 def _doActivate(self):
     from bootcamp.Bootcamp import g_bootcamp
     yield self.itemsCache.update(CACHE_SYNC_REASON.SHOW_GUI)
     resultType = g_bootcamp.getBattleResults().type
     if resultType == BOOTCAMP_BATTLE_RESULT_MESSAGE.FAILURE:
         g_bootcampEvents.onResultScreenFinished()
         return
     else:
         battleCtx = self.sessionProvider.getCtx()
         if battleCtx.lastArenaUniqueID:
             app = self.appLoader.getApp(settings.APP_NAME_SPACE.SF_LOBBY)
             self.appLoader.getWaitingWorker().hide(
                 R.strings.waiting.exit_battle())
             if app is not None and app.initialized:
                 self.__requestBattleResults(battleCtx.lastArenaUniqueID)
             else:
                 self.__storedArenaUniqueID = battleCtx.lastArenaUniqueID
                 g_eventBus.addListener(
                     events.AppLifeCycleEvent.INITIALIZED,
                     self.__onAppInitialized, EVENT_BUS_SCOPE.GLOBAL)
             battleCtx.lastArenaUniqueID = None
             battleCtx.lastArenaBonusType = None
         return
 def click(self):
     g_bootcampEvents.onResultScreenFinished()
     self.destroy()
Пример #4
0
 def delayedFinish():
     g_bootcampEvents.onResultScreenFinished()
Пример #5
0
 def click(self):
     g_bootcampEvents.onResultScreenFinished(self.selectedReward)
     self.destroy()