From 8e84cbc083b3c51ebdefe32a47eadc0f8a270d48 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 10 Nov 2012 14:01:07 +0000 Subject: Protocol 1.4.2: found out and fixed the reason behind the fake "login" packet: the locale_viewdistance packet had been extended git-svn-id: http://mc-server.googlecode.com/svn/trunk@1028 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Protocol/Protocol142.cpp | 12 ++++++++++-- source/Protocol/Protocol142.h | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/Protocol/Protocol142.cpp b/source/Protocol/Protocol142.cpp index 17501169d..a9d49cd79 100644 --- a/source/Protocol/Protocol142.cpp +++ b/source/Protocol/Protocol142.cpp @@ -76,9 +76,17 @@ cProtocol142::~cProtocol142() -int cProtocol142::ParseLogin(void) +int cProtocol142::ParseLocaleViewDistance(void) { - // This packet seems to be back in 1.4.2, no documentation yet. + HANDLE_PACKET_READ(ReadBEUTF16String16, AString, Locale); + HANDLE_PACKET_READ(ReadChar, char, ViewDistance); + HANDLE_PACKET_READ(ReadChar, char, ChatFlags); + HANDLE_PACKET_READ(ReadChar, char, ClientDifficulty); + HANDLE_PACKET_READ(ReadChar, char, ShouldShowCape); // <-- new in 1.4.2 + // TODO: m_Client->HandleLocale(Locale); + // TODO: m_Client->HandleViewDistance(ViewDistance); + // TODO: m_Client->HandleChatFlags(ChatFlags); + // Ignoring client difficulty return PARSE_OK; } diff --git a/source/Protocol/Protocol142.h b/source/Protocol/Protocol142.h index 96256044f..aba548efb 100644 --- a/source/Protocol/Protocol142.h +++ b/source/Protocol/Protocol142.h @@ -30,7 +30,7 @@ public: virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay) override; // Specific packet parsers: - virtual int ParseLogin (void) override; + virtual int ParseLocaleViewDistance(void) override; } ; -- cgit v1.2.3