Exemplo n.º 1
0
 def __doStartTraining(self):
     result = yield self.prbDispatcher.sendPrbRequest(prb_ctx.SetTeamStateCtx(1, True))
     if result:
         result = yield self.prbDispatcher.sendPrbRequest(prb_ctx.SetTeamStateCtx(2, True))
         if not result:
             yield self.prbDispatcher.sendPrbRequest(prb_ctx.SetTeamStateCtx(1, False))
     if not result:
         self.__showActionErrorMessage()
         self.as_disableControlsS(False)
         self.__updateStartButton(self.prbFunctional)
Exemplo n.º 2
0
 def __setTeamReady(self):
     if self.isCreator():
         self.setTeamState(
             prb_ctx.SetTeamStateCtx(1,
                                     True,
                                     waitingID='prebattle/team_ready',
                                     gamePlayMask=gameplay_ctx.getMask()))
Exemplo n.º 3
0
 def exitFromQueue(self):
     if self.isCreator():
         self.setTeamState(
             prb_ctx.SetTeamStateCtx(1,
                                     False,
                                     waitingID='prebattle/team_not_ready'))
     else:
         self.setPlayerState(
             prb_ctx.SetPlayerStateCtx(
                 False, waitingID='prebattle/player_not_ready'))
     return True