mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
Support for protocol 7.7/7.72 / Tiny fix
This commit is contained in:
@@ -14,7 +14,7 @@ function reloadScripts()
|
||||
g_textures.clearCache()
|
||||
g_modules.reloadModules()
|
||||
|
||||
local script = '/' .. g_app.getCompactName() .. 'rc'
|
||||
local script = '/' .. g_app.getCompactName() .. 'rc.lua'
|
||||
if g_resources.fileExists(script) then
|
||||
dofile(script)
|
||||
end
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user