Esempio n. 1
0
 def onBecomeNonPlayer(self):
     super(PlayerBootcampAccount, self).onBecomeNonPlayer()
     g_bootcampEvents.onBootcampBecomeNonPlayer()
     g_bootcamp.hideActionWaitWindow()
     if g_bootcamp is not None:
         g_bootcamp.setAccount(None)
     return
Esempio n. 2
0
 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 showGUI(self, bootcampCtxStr):
     LOG_DEBUG_DEV_BOOTCAMP('showGUI called')
     g_bootcamp.hideActionWaitWindow()
     bootcampCtx = cPickle.loads(bootcampCtxStr)
     self.databaseID = bootcampCtx['databaseID']
     currentLesson = bootcampCtx['lessonNum']
     isBattleLesson = bootcampCtx['isBattleLesson']
     g_bootcamp.setAccount(self)
     g_bootcamp.setContext(bootcampCtx)
     events.isPlayerEntityChanging = False
     firstRun = currentLesson == 0 and not g_bootcamp.isRunning()
     events.onBootcampShowGUI(firstRun)
     if g_bootcamp.isRunning():
         g_bootcamp.onBattleLessonFinished(currentLesson, bootcampCtx['lessonResults'])
     elif not g_bootcamp.isManualStart():
         g_bootcamp.start(currentLesson, isBattleLesson)
Esempio n. 4
0
 def showGUI(self, ctx):
     LOG_DEBUG_DEV_BOOTCAMP('showGUI called')
     g_bootcamp.hideActionWaitWindow()
     ctx = cPickle.loads(ctx)
     guiCtx = ctx['gui']
     self.lobbyContext.onAccountShowGUI(guiCtx)
     self._initTimeCorrection(guiCtx)
     bootcampCtx = ctx['bootcamp']
     self.databaseID = bootcampCtx['databaseID']
     currentLesson = bootcampCtx['lessonNum']
     isBattleLesson = bootcampCtx['isBattleLesson']
     g_bootcamp.setAccount(self)
     g_bootcamp.setContext(bootcampCtx)
     events.isPlayerEntityChanging = False
     if g_bootcamp.isRunning():
         g_bootcamp.onBattleLessonFinished(currentLesson, bootcampCtx['lessonResults'])
     elif not g_bootcamp.isManualStart():
         g_bootcamp.start(currentLesson, isBattleLesson)