From b237b713ef15a9ed3bf9bdf663b4a4055f0373c7 Mon Sep 17 00:00:00 2001 From: TheSumm Date: Mon, 9 Mar 2015 16:46:26 +0100 Subject: [PATCH] Fix 10.76 login protocol, added missing lua consts --- modules/gamelib/const.lua | 4 +++- modules/gamelib/protocollogin.lua | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/gamelib/const.lua b/modules/gamelib/const.lua index 71594a6c..2134760a 100644 --- a/modules/gamelib/const.lua +++ b/modules/gamelib/const.lua @@ -195,7 +195,9 @@ MessageModes = { RVRChannel = 46, RVRAnswer = 47, RVRContinue = 48, - Last = 49, + GameHighlight = 49, + NpcFromStartBlock = 50, + Last = 51, Invalid = 255, } diff --git a/modules/gamelib/protocollogin.lua b/modules/gamelib/protocollogin.lua index 9b791b78..9d871aa4 100644 --- a/modules/gamelib/protocollogin.lua +++ b/modules/gamelib/protocollogin.lua @@ -11,6 +11,10 @@ LoginServerSessionKey = 40 LoginServerCharacterList = 100 LoginServerExtendedCharacterList = 101 +-- Since 10.76 +LoginServerRetry = 10 +LoginServerErrorNew = 11 + function ProtocolLogin:login(host, port, accountName, accountPassword, authenticatorToken, stayLogged) if string.len(host) == 0 or port == nil or port == 0 then signalcall(self.onLoginError, self, tr("You must enter a valid server address and port.")) @@ -144,7 +148,9 @@ end function ProtocolLogin:onRecv(msg) while not msg:eof() do local opcode = msg:getU8() - if opcode == LoginServerError then + if opcode == LoginServerErrorNew then + self:parseError(msg) + elseif opcode == LoginServerError then self:parseError(msg) elseif opcode == LoginServerMotd then self:parseMotd(msg)