Just thought I'd cross-post this here since it seems to have ended up being (partly) an issue with PyLotRO:
http://www.codeweavers.com/compatibility/browse/name/?app_id=2869;forum=1;msg=116312
The following comments are owned by whoever posted them. We are not responsible for them in any way.
Back to Threads Reply to Thread
Just thought I'd cross-post this here since it seems to have ended up being (partly) an issue with PyLotRO:
http://www.codeweavers.com/compatibility/browse/name/?app_id=2869;forum=1;msg=116312
I believe this patch should do the trick, but I'm not set up to actually build and test it.
--- PyLotROLauncher/MainWindow.py.orig 2011-06-02 11:53:34.000000000 +1000
+++ PyLotROLauncher/MainWindow.py 2012-01-27 03:25:05.000000000 +1100
@@ -347,10 +347,10 @@
self.urlChatServer = tempRealm.urlChatServer
self.urlLoginServer = tempRealm.loginServer
- if tempRealm.queueURL == "":
+ if tempRealm.queueURLs == []:
self.LaunchGame()
else:
- self.EnterWorldQueue(tempRealm.queueURL)
+ self.EnterWorldQueue(tempRealm.queueURLs)
else:
self.AddLog("[E10] Error getting realm status")
else:
@@ -368,9 +368,9 @@
self.winMain.hide()
game.Run()
- def EnterWorldQueue(self, queueURL):
+ def EnterWorldQueue(self, queueURLs):
self.worldQueue = JoinWorldQueue(self.worldQueueConfig.worldQueueParam,
- self.accNumber, self.account.ticket, queueURL, self.worldQueueConfig.worldQueueURL, self.valHomeDir, self.osType)
+ self.accNumber, self.account.ticket, queueURLs, self.worldQueueConfig.worldQueueURL, self.valHomeDir, self.osType)
if self.worldQueue.joinSuccess:
self.AddLog("Joined world queue")
@@ -383,7 +383,7 @@
displayQueueing = False
self.worldQueue = JoinWorldQueue(self.worldQueueConfig.worldQueueParam,
- self.accNumber, self.account.ticket, queueURL, self.worldQueueConfig.worldQueueURL,
+ self.accNumber, self.account.ticket, queueURLs, self.worldQueueConfig.worldQueueURL,
self.valHomeDir, self.osType)
if not self.worldQueue.joinSuccess:
--- PyLotROLauncher/PyLotROUtils.py.orig 2011-06-02 12:54:52.000000000 +1000
+++ PyLotROLauncher/PyLotROUtils.py 2012-01-28 02:25:21.000000000 +1100
@@ -359,7 +359,7 @@
self.realmAvailable = False
self.nowServing = ""
self.loginServer = ""
- self.queueURL = ""
+ self.queueURLs = []
def CheckRealm(self, useDND, baseDir, osType):
try:
@@ -388,11 +388,13 @@
self.nowServing = ""
try:
- self.queueURL = GetText(doc.getElementsByTagName("queueurls")[0].childNodes).split(";")[0]
+ self.queueURLs = GetText(doc.getElementsByTagName("queueurls")[0].childNodes).split(";")[:-1]
+ # official launcher tries the last listed queueURL first
+ self.queueURLs.reverse()
except:
- self.queueURL = ""
+ self.queueURLs = []
- self.loginServer = GetText(doc.getElementsByTagName("loginservers")[0].childNodes).split(";")[0]
+ self.loginServer = GetText(doc.getElementsByTagName("loginservers")[0].childNodes).split(";")[-2]
self.realmAvailable = True
except:
@@ -535,41 +537,43 @@
self.messError = "[E08] Server not found - may be down (%s)" % (webresp.status)
class JoinWorldQueue:
- def __init__(self, argTemplate, account, ticket, queue, urlIn, baseDir, osType):
- try:
- webservice, post = WebConnection(urlIn)
-
- argComplete = argTemplate.replace("{0}", account).replace("{1}",
- quote(ticket)).replace("{2}", quote(queue))
-
- webservice.putrequest("POST", post)
- webservice.putheader("Content-type", "application/x-www-form-urlencoded")
- webservice.putheader("Content-length", "%d" % len(argComplete))
- webservice.putheader("SOAPAction", "http://www.turbine.com/SE/GLS/LoginAccount")
- webservice.endheaders()
- webservice.send(argComplete)
+ def __init__(self, argTemplate, account, ticket, queues, urlIn, baseDir, osType):
+ for queue in queues:
+ try:
+ webservice, post = WebConnection(urlIn)
+
+ argComplete = argTemplate.replace("{0}", account).replace("{1}",
+ quote(ticket)).replace("{2}", quote(queue))
+
+ webservice.putrequest("POST", post)
+ webservice.putheader("Content-type", "application/x-www-form-urlencoded")
+ webservice.putheader("Content-length", "%d" % len(argComplete))
+ webservice.putheader("SOAPAction", "http://www.turbine.com/SE/GLS/LoginAccount")
+ webservice.endheaders()
+ webservice.send(argComplete)
+
+ webresp = webservice.getresponse()
+
+ tempxml = webresp.read()
+
+ filename = "%s%sWorldQueue.config" % (baseDir, osType.appDir)
+ outfile = open(filename, "w")
+ outfile.write(tempxml)
+ outfile.close()
- webresp = webservice.getresponse()
-
- tempxml = webresp.read()
-
- filename = "%s%sWorldQueue.config" % (baseDir, osType.appDir)
- outfile = open(filename, "w")
- outfile.write(tempxml)
- outfile.close()
+ if tempxml == "":
+ self.joinSuccess = False
+ else:
+ doc = xml.dom.minidom.parseString(tempxml)
- if tempxml == "":
+ if GetText(doc.getElementsByTagName("HResult")[0].childNodes) == "0x00000000":
+ self.number = GetText(doc.getElementsByTagName("QueueNumber")[0].childNodes)
+ self.serving = GetText(doc.getElementsByTagName("NowServingNumber")[0].childNodes)
+
+ self.joinSuccess = True
+ break
+ else:
+ self.joinSuccess = False
+ except:
self.joinSuccess = False
- else:
- doc = xml.dom.minidom.parseString(tempxml)
-
- if GetText(doc.getElementsByTagName("HResult")[0].childNodes) == "0x00000000":
- self.number = GetText(doc.getElementsByTagName("QueueNumber")[0].childNodes)
- self.serving = GetText(doc.getElementsByTagName("NowServingNumber")[0].childNodes)
-
- self.joinSuccess = True
- else:
- self.joinSuccess = False
- except:
- self.joinSuccess = False
EDIT: fixed a bug with the list indices
I tracked down an appropriately old version of PyQt4 for Windows and have now managed to make a build of PyLotRO that can log in to Gilrain as well as the other servers. So it looks like the revised patch above works.
CrossOver Forums: the place to discuss running Windows applications on Mac and Linux