def onDisconnected(): if game_control.g_instance.roaming.isInRoaming(): g_preDefinedHosts.savePeripheryTL(connectionManager.peripheryID) g_prbLoader.onDisconnected() g_clanCache.onDisconnected() game_control.g_instance.onDisconnected() g_itemsCache.clear() g_lobbyContext.clear() Waiting.rollback() Waiting.cancelCallback()
def showBattleLoading(self): if self.window.cursorMgr is not None: self.window.cursorMgr.detachCursor(True) g_preDefinedHosts.savePeripheryTL(connectionManager.peripheryID) arena = getattr(BigWorld.player(), 'arena', None) if arena is not None and arena.guiType is ARENA_GUI_TYPE.TUTORIAL: eventType = VIEW_ALIAS.TUTORIAL_LOADING else: eventType = VIEW_ALIAS.BATTLE_LOADING self.window.fireEvent(LoadViewEvent(eventType), scope=EVENT_BUS_SCOPE.LOBBY) return
def showBattleLoading(self): if self.window.cursorMgr is not None: self.window.cursorMgr.detachCursor(True) g_preDefinedHosts.savePeripheryTL(connectionManager.peripheryID) arena = getattr(BigWorld.player(), 'arena', None) if arena is not None and arena.guiType is ARENA_GUI_TYPE.TUTORIAL: eventType = LoadEvent.LOAD_TUTORIAL_LOADING else: eventType = LoadEvent.LOAD_BATTLE_LOADING self.window.fireEvent(LoadEvent(eventType, {'loadComplete': self.showBattle}), scope=EVENT_BUS_SCOPE.LOBBY) if self.window is not None and self.window.browser is not None and constants.IS_CHINA: self.window.browser.onBattleEnter() return
def handleKickWhileLogin(self, peripheryID): if peripheryID < 0: self.__kickPeripheryID = peripheryID return g_preDefinedHosts.savePeripheryTL(peripheryID) self.__kickedFromServer = True messageType = 'another_periphery' if peripheryID else 'checkout_error' errorMessage = i18n.makeString(SYSTEM_MESSAGES.all(messageType)) self.onSetStatus(errorMessage, self.ALL_VALID) urls = g_preDefinedHosts.urlIterator(self.__loginDataLoader.host) if urls is not None and urls.end(): urls.cursor = 0 message = i18n.makeString(WAITING.message(messageType), connectionManager.serverUserName) self.onHandleKickWhileLogin(messageType, message) self.__setAutoLoginTimer(self.__getLgNextTimeout())
def onDisconnected(): if game_control.g_instance.roaming.isInRoaming(): g_preDefinedHosts.savePeripheryTL(connectionManager.peripheryID) g_prbLoader.onDisconnected() g_clanCache.onDisconnected() game_control.g_instance.onDisconnected() g_clubsCtrl.stop(isDisconnected=True) g_wgncProvider.clear() g_itemsCache.clear() g_goodiesCache.clear() g_eventsCache.clear() g_lobbyContext.clear() g_vehicleProgressCache.clear() UsersInfoHelper.clear() Waiting.rollback() Waiting.cancelCallback()
def onDisconnected(): serverSettings = g_lobbyContext.getServerSettings() if serverSettings is not None and serverSettings.roaming.isInRoaming(): g_preDefinedHosts.savePeripheryTL(connectionManager.peripheryID) g_prbLoader.onDisconnected() g_clanCache.onDisconnected() game_control.g_instance.onDisconnected() g_clubsCtrl.stop(isDisconnected=True) g_wgncProvider.clear() g_itemsCache.clear() g_goodiesCache.clear() g_eventsCache.clear() g_lobbyContext.clear() g_vehicleProgressCache.clear() UsersInfoHelper.clear() Waiting.rollback() Waiting.cancelCallback() g_appLoader.goToLoginByEvent()