Support for protocol 7.7/7.72 / Tiny fix

This commit is contained in:
Sam
2013-12-26 21:31:55 +01:00
parent 91c182d93d
commit da959aca28
6 changed files with 24 additions and 16 deletions

View File

@@ -48,11 +48,12 @@ end
function g_game.getSupportedClients()
return {
760, 810, 811, 840, 842, 850, 853,
854, 860, 861, 862, 870, 910, 940,
944, 953, 954, 960, 961, 963, 970,
980, 981, 982, 983, 984, 985, 986,
1001, 1002, 1010, 1020, 1021, 1022,
760, 770, 772, 810, 811, 840, 842,
850, 853, 854, 860, 861, 862, 870,
910, 940, 944, 953, 954, 960, 961,
963, 970, 980, 981, 982, 983, 984,
985, 986, 1001, 1002, 1010, 1020,
1021, 1022
}
end

View File

@@ -46,7 +46,7 @@ function ProtocolLogin:sendLoginPacket()
local offset = msg:getMessageSize()
if g_game.getProtocolVersion() >= 800 then
if g_game.getProtocolVersion() >= 770 then
-- first RSA byte must be 0
msg:addU8(0)
-- xtea key
@@ -74,7 +74,7 @@ function ProtocolLogin:sendLoginPacket()
local paddingBytes = g_crypt.rsaGetSize() - (msg:getMessageSize() - offset)
assert(paddingBytes >= 0)
msg:addPaddingBytes(paddingBytes, 0)
if g_game.getProtocolVersion() >= 800 then
if g_game.getProtocolVersion() >= 770 then
msg:encryptRsa()
end
@@ -83,7 +83,7 @@ function ProtocolLogin:sendLoginPacket()
end
self:send(msg)
if g_game.getProtocolVersion() >= 800 then
if g_game.getProtocolVersion() >= 770 then
self:enableXteaEncryption()
end
self:recv()