Beispiel #1
0
 def __init__(self, loginPreferences):
     self._loginPreferences = loginPreferences
     g_preDefinedHosts.readScriptConfig(Settings.g_instance.scriptConfig)
     g_preDefinedHosts.onCsisQueryStart += self.__onCsisUpdate
     g_preDefinedHosts.onCsisQueryComplete += self.__onCsisUpdate
     if GUI_SETTINGS.csisRequestRate == REQUEST_RATE.ALWAYS:
         g_preDefinedHosts.startCSISUpdate()
     self._serverList = []
     self._selectedServerIdx = 0
     self.updateServerList()
 def ping_request(self):
     try:
         if not self.hooks_set:
             BigWorld.WGPinger.setOnPingCallback(self.results_arrived)
             self.hooks_set = True
         if not self.url_to_serverName:
             g_preDefinedHosts.readScriptConfig(Settings.g_instance.scriptConfig)
             self.url_to_serverName = {host.url:host.name if len(host.name) < 13 else host.shortName for host in g_preDefinedHosts.hosts()}
             if self.url_to_serverName: # if url_to_serverName is empty, leave it empty
                 self.url_to_serverName[DUMMY_ADDRESS] = DUMMY_ADDRESS
         BigWorld.WGPinger.ping(self.url_to_serverName.keys())
     except Exception as ex:
         err('ping_request() exception: ' + traceback.format_exc())
 def _populate(self):
     super(LoginDispatcher, self)._populate()
     self.__loginDataLoader = LoginDataLoader()
     self.__loginDataLoader.onConfigLoaded += self.onConfigLoaded
     self.__loginDataLoader.loadUserConfig()
     connectionManager.connectionStatusCallbacks += self.__handleConnectionStatus
     connectionManager.searchServersCallbacks += self.__serversFind
     connectionManager.onConnected += self.__onConnected
     connectionManager.onDisconnected -= LoginDispatcher.__onDisconnected
     connectionManager.startSearchServers()
     g_preDefinedHosts.readScriptConfig(Settings.g_instance.scriptConfig)
     g_playerEvents.onLoginQueueNumberReceived += self.handleQueue
     g_playerEvents.onAccountBecomePlayer += self.__pe_onAccountBecomePlayer
     g_playerEvents.onKickWhileLoginReceived += self.handleKickWhileLogin
     self.onSetOptions(g_preDefinedHosts.shortList(), self.__loginDataLoader.host)
Beispiel #4
0
 def _populate(self):
     super(LoginDispatcher, self)._populate()
     self.__loginDataLoader = LoginDataLoader()
     self.__loginDataLoader.onConfigLoaded += self.onConfigLoaded
     self.__loginDataLoader.loadUserConfig()
     connectionManager.connectionStatusCallbacks += self.__handleConnectionStatus
     connectionManager.searchServersCallbacks += self.__serversFind
     connectionManager.onConnected += self.__onConnected
     connectionManager.startSearchServers()
     g_preDefinedHosts.readScriptConfig(Settings.g_instance.scriptConfig)
     g_playerEvents.onLoginQueueNumberReceived += self.handleQueue
     g_playerEvents.onAccountBecomePlayer += self.__pe_onAccountBecomePlayer
     g_playerEvents.onKickWhileLoginReceived += self.handleKickWhileLogin
     if GUI_SETTINGS.csisRequestRate == REQUEST_RATE.ALWAYS:
         g_preDefinedHosts.startCSISUpdate()
     g_preDefinedHosts.onCsisQueryStart += self.__onCsisUpdate
     g_preDefinedHosts.onCsisQueryComplete += self.__onCsisUpdate
     self.onSetOptions(self.__getFullServersList(), self.__loginDataLoader.host)