Browse Source

Fix 10.76 login protocol, added missing lua consts

TheSumm 6 years ago
parent
commit
b237b713ef
2 changed files with 10 additions and 2 deletions
  1. 3
    1
      modules/gamelib/const.lua
  2. 7
    1
      modules/gamelib/protocollogin.lua

+ 3
- 1
modules/gamelib/const.lua View File

@@ -195,7 +195,9 @@ MessageModes = {
195 195
   RVRChannel              = 46,
196 196
   RVRAnswer               = 47,
197 197
   RVRContinue             = 48,
198
-  Last                    = 49,
198
+  GameHighlight           = 49,
199
+  NpcFromStartBlock       = 50,
200
+  Last                    = 51,
199 201
   Invalid                 = 255,
200 202
 }
201 203
 

+ 7
- 1
modules/gamelib/protocollogin.lua View File

@@ -11,6 +11,10 @@ LoginServerSessionKey = 40
11 11
 LoginServerCharacterList = 100
12 12
 LoginServerExtendedCharacterList = 101
13 13
 
14
+-- Since 10.76
15
+LoginServerRetry = 10
16
+LoginServerErrorNew = 11
17
+
14 18
 function ProtocolLogin:login(host, port, accountName, accountPassword, authenticatorToken, stayLogged)
15 19
   if string.len(host) == 0 or port == nil or port == 0 then
16 20
     signalcall(self.onLoginError, self, tr("You must enter a valid server address and port."))
@@ -144,7 +148,9 @@ end
144 148
 function ProtocolLogin:onRecv(msg)
145 149
   while not msg:eof() do
146 150
     local opcode = msg:getU8()
147
-    if opcode == LoginServerError then
151
+    if opcode == LoginServerErrorNew then
152
+      self:parseError(msg)
153
+    elseif opcode == LoginServerError then
148 154
       self:parseError(msg)
149 155
     elseif opcode == LoginServerMotd then
150 156
       self:parseMotd(msg)

Loading…
Cancel
Save