1
0

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
This commit is contained in:
madmaxoft@gmail.com 2012-11-10 14:01:07 +00:00
parent 25434f50f1
commit 8e84cbc083
2 changed files with 11 additions and 3 deletions

View File

@ -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; return PARSE_OK;
} }

View File

@ -30,7 +30,7 @@ public:
virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay) override; virtual void SendTimeUpdate (Int64 a_WorldAge, Int64 a_TimeOfDay) override;
// Specific packet parsers: // Specific packet parsers:
virtual int ParseLogin (void) override; virtual int ParseLocaleViewDistance(void) override;
} ; } ;