def onLogoff(self, arg): import BigWorld from gui.WindowsManager import g_windowsManager BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces() g_windowsManager.showLobby()
def show(self, reason, isBan=None, expiryTime=None): BigWorld.disconnect() Cursor.forceShowCursor(True) message = '' if isBan: if reason.upper().startswith('#'): if len(reason) == 0: reason = 'connection_lost' reason = makeString(reason.upper()) if not isinstance(reason, unicode): convert(reason) if expiryTime: strExpireTime = getFormattedTime(expiryTime) message = localizeMenu('LOGIN/STATUS/LOGIN_REJECTED_BAN') message = message % {'time': strExpireTime, 'reason': reason} else: message = localizeMenu( 'LOGIN/STATUS/LOGIN_REJECTED_BAN_UNLIMITED') message = message % {'reason': reason} else: message = localizeMessages('DISCONNECT/' + reason) self.call_1('setMessage', message, localizeMessages('DISCONNECT_TITLE'), localizeMessages('DISCONNECT_ENTER_BUTTON')) self.active(True) BigWorld.worldDrawEnabled(False)
def logOff(): from gui.Scaleform.Disconnect import Disconnect Disconnect.hide() BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces() from gui.WindowsManager import g_windowsManager g_windowsManager.showLobby()
def checkClientServerVersions(self, clientVersion, serverVersion): if not isValidClientVersion(clientVersion, serverVersion) or ResMgr.activeContentType( ) in (constants.CONTENT_TYPE.INCOMPLETE, constants.CONTENT_TYPE.TUTORIAL): LOG_DEBUG('Version mismatch. Client is "%s", server needs "%s".' % (clientVersion, serverVersion)) self.onRejected(LOGIN_STATUS.LOGIN_BAD_PROTOCOL_VERSION, {}) BigWorld.disconnect()
def disconnect(self): keepClientOnlySpaces = False from gui.shared.utils.HangarSpace import g_hangarSpace if g_hangarSpace is not None and g_hangarSpace.inited: keepClientOnlySpaces = g_hangarSpace.spaceLoading() BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces(keepClientOnlySpaces) if self.isConnected(): self._ConnectionManager__setConnectionStatus(CONNECTION_STATUS.disconnectingInProgress)
def stop(self, rewindToTime = None): if not self.isPlaying and not self.isRecording: return False wasPlaying = self.isPlaying isOffline = self.__replayCtrl.isOfflinePlaybackMode self.__replayCtrl.stop() self.__fileName = None if self.__disableSidePanelContextMenuCb is not None: BigWorld.cancelCallback(self.__disableSidePanelContextMenuCb) self.__disableSidePanelContextMenuCb = None if wasPlaying: if not isOffline: connectionManager.onDisconnected += self.__showLoginPage BigWorld.clearEntitiesAndSpaces() BigWorld.disconnect() if self.__quitAfterStop: BigWorld.quit() elif isOffline: self.__showLoginPage()
def stop(self, rewindToTime=None, delete=False): if not self.isPlaying and not self.isRecording: return False self.onStopped() wasPlaying = self.isPlaying isOffline = self.__replayCtrl.isOfflinePlaybackMode self.__replayCtrl.stop(delete) self.__fileName = None if self.__disableSidePanelContextMenuCb is not None: BigWorld.cancelCallback(self.__disableSidePanelContextMenuCb) self.__disableSidePanelContextMenuCb = None if wasPlaying: if not isOffline: connectionManager.onDisconnected += self.__showLoginPage BigWorld.clearEntitiesAndSpaces() BigWorld.disconnect() if self.__quitAfterStop: BigWorld.quit() elif isOffline: self.__showLoginPage()
def stop(self, rewindToTime = None, delete = False): if not self.isPlaying and not self.isRecording: return False else: self.onStopped() wasPlaying = self.isPlaying isOffline = self.__replayCtrl.isOfflinePlaybackMode self.__replayCtrl.stop(delete) self.__fileName = None if wasPlaying: if isPlayerAvatar(): BigWorld.player().onVehicleEnterWorld -= self.__onVehicleEnterWorld if not isOffline: connectionManager.onDisconnected += self.__showLoginPage BigWorld.clearEntitiesAndSpaces() BigWorld.disconnect() if self.__quitAfterStop: BigWorld.quit() elif isOffline: self.__showLoginPage() return
def checkClientServerVersions(self, clientVersion, serverVersion): if not isValidClientVersion(clientVersion, serverVersion) or ResMgr.activeContentType() in (constants.CONTENT_TYPE.INCOMPLETE, constants.CONTENT_TYPE.TUTORIAL): LOG_DEBUG('Version mismatch. Client is "%s", server needs "%s".' % (clientVersion, serverVersion)) self.onRejected(LOGIN_STATUS.LOGIN_BAD_PROTOCOL_VERSION, {}) BigWorld.disconnect()
def disconnect(self): BigWorld.disconnect()
def iCallback(): BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces() Waiting.close()
def disconnect(self): if not self.isDisconnected(): BigWorld.disconnect()
def disconnect(self): BigWorld.disconnect() if self.isConnected(): self.__setConnectionStatus( CONNECTION_STATUS.disconnectingInProgress)
def disconnect(self): BigWorld.disconnect() if self.isConnected(): self.__setConnectionStatus(CONNECTION_STATUS.disconnectingInProgress)
def logOff(): BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces()