예제 #1
0
 def tryLeaveRequest(self, _):
     exitResult = g_sessionProvider.getExitResult()
     if exitResult.playerInfo is not None:
         igrType = exitResult.playerInfo.igrType
     else:
         igrType = constants.IGR_TYPE.NONE
     if constants.IS_KOREA and GUI_SETTINGS.igrEnabled and igrType != constants.IGR_TYPE.NONE:
         resStr = 'quitBattleIGR'
     else:
         resStr = 'quitBattle'
     if exitResult.isDeserter:
         self.__callEx('tryLeaveResponse', [resStr + '/deserter', True])
     else:
         self.__callEx('tryLeaveResponse', [resStr, False])
     return
예제 #2
0
 def tryLeaveRequest(self, _):
     exitResult = g_sessionProvider.getExitResult()
     if exitResult.playerInfo is not None:
         igrType = exitResult.playerInfo.igrType
     else:
         igrType = constants.IGR_TYPE.NONE
     if constants.IS_KOREA and GUI_SETTINGS.igrEnabled and igrType != constants.IGR_TYPE.NONE:
         resStr = 'quitBattleIGR'
     else:
         resStr = 'quitBattle'
     if exitResult.isDeserter:
         self.__callEx('tryLeaveResponse', [resStr + '/deserter', True])
     else:
         self.__callEx('tryLeaveResponse', [resStr, False])
     return
예제 #3
0
 def __doLeaveArena(self):
     exitResult = g_sessionProvider.getExitResult()
     if exitResult.playerInfo is not None:
         igrType = exitResult.playerInfo.igrType
     else:
         igrType = constants.IGR_TYPE.NONE
     if constants.IS_KOREA and GUI_SETTINGS.igrEnabled and igrType != constants.IGR_TYPE.NONE:
         i18nKey = 'quitBattleIGR'
     else:
         i18nKey = 'quitBattle'
     if exitResult.isDeserter:
         result = yield DialogsInterface.showDialog(IngameDeserterDialogMeta(i18nKey + '/deserter', focusedID=DIALOG_BUTTON_ID.CLOSE))
     else:
         result = yield DialogsInterface.showDialog(I18nConfirmDialogMeta('quitBattle', focusedID=DIALOG_BUTTON_ID.CLOSE))
     if result:
         g_sessionProvider.exit()
         self.destroy()
     return
예제 #4
0
 def __doLeaveArena(self):
     exitResult = g_sessionProvider.getExitResult()
     if exitResult.playerInfo is not None:
         igrType = exitResult.playerInfo.igrType
     else:
         igrType = constants.IGR_TYPE.NONE
     if constants.IS_KOREA and GUI_SETTINGS.igrEnabled and igrType != constants.IGR_TYPE.NONE:
         i18nKey = 'quitBattleIGR'
     else:
         i18nKey = 'quitBattle'
     if exitResult.isDeserter:
         result = yield DialogsInterface.showDialog(IngameDeserterDialogMeta(i18nKey + '/deserter', focusedID=DIALOG_BUTTON_ID.CLOSE))
     else:
         result = yield DialogsInterface.showDialog(I18nConfirmDialogMeta('quitBattle', focusedID=DIALOG_BUTTON_ID.CLOSE))
     if result:
         g_sessionProvider.exit()
         self.destroy()
     return