Skip to content

Commit

Permalink
Fix 7.60 login protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam committed Dec 23, 2013
1 parent 6a4868f commit 9d8cf33
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
6 changes: 1 addition & 5 deletions modules/gamelib/protocol.lua
Expand Up @@ -188,9 +188,5 @@ ClientOpcodes = {
ClientMarketCreate = 246, -- 944
ClientMarketCancel = 247, -- 944
ClientMarketAccept = 248, -- 944
ClientAnswerModalDialog = 249, -- 960

-- 760
ClientEnterAccount760 = 513,
ClientEnterGame760 = 522
ClientAnswerModalDialog = 249 -- 960
}
15 changes: 5 additions & 10 deletions modules/gamelib/protocollogin.lua
Expand Up @@ -27,13 +27,9 @@ end

function ProtocolLogin:sendLoginPacket()
local msg = OutputMessage.create()
if g_game.getProtocolVersion() == 760 then
msg:addU16(ClientOpcodes.ClientEnterAccount760)
else
msg:addU8(ClientOpcodes.ClientEnterAccount)
msg:addU16(g_game.getOs())
end

msg:addU8(ClientOpcodes.ClientEnterAccount)
msg:addU16(g_game.getOs())

msg:addU16(g_game.getProtocolVersion())

if g_game.getProtocolVersion() >= 971 then
Expand All @@ -50,10 +46,9 @@ function ProtocolLogin:sendLoginPacket()

local offset = msg:getMessageSize()

-- first RSA byte must be 0
msg:addU8(0)

if g_game.getProtocolVersion() >= 800 then
-- first RSA byte must be 0
msg:addU8(0)
-- xtea key
self:generateXteaKey()
local xteaKey = self:getXteaKey()
Expand Down
12 changes: 2 additions & 10 deletions src/client/protocolgamesend.cpp
Expand Up @@ -52,16 +52,8 @@ void ProtocolGame::sendLoginPacket(uint challengeTimestamp, uint8 challengeRando
{
OutputMessagePtr msg(new OutputMessage);

if(g_game.getProtocolVersion() == 760)
{
msg->addU16(0x20A);
msg->addU8(g_game.getOs());
}
else
{
msg->addU8(Proto::ClientPendingGame);
msg->addU16(g_game.getOs());
}
msg->addU8(Proto::ClientPendingGame);
msg->addU16(g_game.getOs());
msg->addU16(g_game.getProtocolVersion());

if(g_game.getProtocolVersion() >= 971) {
Expand Down

0 comments on commit 9d8cf33

Please sign in to comment.