From 4b7770361ddcf707665b48407a4bbf2ead3c7c69 Mon Sep 17 00:00:00 2001 From: TheSumm Date: Tue, 30 Dec 2014 19:25:20 +0100 Subject: [PATCH] Fix parseLogin packet --- src/client/const.h | 3 ++- src/client/protocolcodes.cpp | 2 +- src/client/protocolgameparse.cpp | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/client/const.h b/src/client/const.h index dd36caf9..902cb7d5 100644 --- a/src/client/const.h +++ b/src/client/const.h @@ -329,7 +329,8 @@ namespace Otc MessageRVRAnswer = 47, MessageRVRContinue = 48, MessageGameHighlight = 49, - LastMessage = 50, + MessageNpcFromStartBlock = 50, + LastMessage = 51, MessageInvalid = 255 }; diff --git a/src/client/protocolcodes.cpp b/src/client/protocolcodes.cpp index 134e24d2..865f8864 100644 --- a/src/client/protocolcodes.cpp +++ b/src/client/protocolcodes.cpp @@ -40,7 +40,7 @@ void buildMessageModesMap(int version) { messageModesMap[Otc::MessageChannel] = 7; messageModesMap[Otc::MessageChannelHighlight] = 8; messageModesMap[Otc::MessageSpell] = 9; - //NpcFromStartBlock = 10 + messageModesMap[Otc::MessageNpcFromStartBlock] = 10; messageModesMap[Otc::MessageNpcFrom] = 11; messageModesMap[Otc::MessageNpcTo] = 12; messageModesMap[Otc::MessageGamemasterBroadcast] = 13; diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index a07c766b..0fd626cc 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -385,8 +385,11 @@ void ProtocolGame::parseLogin(const InputMessagePtr& msg) } bool canReportBugs = msg->getU8(); - msg->getU8(); // can change pvp framing option - msg->getU8(); // expert mode enabled + if(g_game.getClientVersion() >= 1053) + msg->getU8(); // can change pvp frame option + + if(g_game.getClientVersion() >= 1058) + msg->getU8(); // expert mode enabled m_localPlayer->setId(playerId); g_game.setServerBeat(serverBeat);