Esempio n. 1
0
 def doLeaveAction(self, dispatcher, ctx = None):
     if ctx is not None:
         funcExit = ctx.getFuncExit()
     else:
         funcExit = FUNCTIONAL_EXIT.NO_FUNC
     meta = self.getConfirmDialogMeta(funcExit)
     if meta is not None:
         isConfirmed = yield DialogsInterface.showDialog(meta)
     else:
         isConfirmed = yield lambda callback: callback(True)
     if isConfirmed:
         if ctx is None:
             ctx = prb_ctx.LeavePrbCtx(waitingID='prebattle/leave')
         if dispatcher._setRequestCtx(ctx):
             self.leave(ctx)
Esempio n. 2
0
 def createLeaveCtx(self, flags=FUNCTIONAL_FLAG.UNDEFINED):
     return prb_ctx.LeavePrbCtx(waitingID='prebattle/leave', flags=flags)
Esempio n. 3
0
 def closeTrainingRoom(self):
     result = yield self.prbDispatcher.leave(prb_ctx.LeavePrbCtx(waitingID='prebattle/leave', flags=FUNCTIONAL_FLAG.SWITCH))
     if not result:
         self.__showActionErrorMessage()
Esempio n. 4
0
 def requestToLeave(self):
     self.prbDispatcher.doLeaveAction(
         prb_ctx.LeavePrbCtx(waitingID='prebattle/leave'))
 def requestToLeave(self):
     self.prbDispatcher.doLeaveAction(
         prb_ctx.LeavePrbCtx(waitingID='prebattle/leave',
                             funcExit=FUNCTIONAL_EXIT.INTRO_PREBATTLE))
Esempio n. 6
0
 def createLeaveCtx(self, funcExit=FUNCTIONAL_EXIT.NO_FUNC):
     return prb_ctx.LeavePrbCtx(waitingID='prebattle/leave',
                                funcExit=funcExit)
Esempio n. 7
0
 def requestToLeave(self):
     self.prbDispatcher.doLeaveAction(
         prb_ctx.LeavePrbCtx(waitingID='prebattle/leave',
                             flags=FUNCTIONAL_FLAG.SWITCH))
Esempio n. 8
0
 def closeTrainingRoom(self):
     result = yield self.prbDispatcher.leave(
         prb_ctx.LeavePrbCtx(waitingID='prebattle/leave',
                             funcExit=FUNCTIONAL_EXIT.INTRO_PREBATTLE))
     if not result:
         self.__showActionErrorMessage()