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
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