From 8aa88e7815125f2d74e9c7bc2ccebf96a7b4f67a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 7 May 2013 08:24:06 +0000 Subject: Protocol132: Replaced magic numbers with symbolic packet names git-svn-id: http://mc-server.googlecode.com/svn/trunk@1454 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Protocol/Protocol132.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp index eb73fde96..c10338f54 100644 --- a/source/Protocol/Protocol132.cpp +++ b/source/Protocol/Protocol132.cpp @@ -67,7 +67,10 @@ enum PACKET_BLOCK_ACTION = 0x36, PACKET_BLOCK_BREAK_ANIM = 0x37, PACKET_SOUND_EFFECT = 0x3e, - PACKET_SOUND_PARTICLE_EFFECT = 0x3d + PACKET_SOUND_PARTICLE_EFFECT = 0x3d, + PACKET_LOCALE_VIEW_DISTANCE = 0xcc, + PACKET_CLIENT_STATUSES = 0xcd, + PACKET_ENCRYPTION_KEY_RESP = 0xfc, } ; @@ -468,10 +471,10 @@ int cProtocol132::ParsePacket(unsigned char a_PacketType) { switch (a_PacketType) { - default: return super::ParsePacket(a_PacketType); // off-load previously known packets into cProtocol125 - case 0xcc: return ParseLocaleViewDistance(); - case 0xcd: return ParseClientStatuses(); - case 0xfc: return ParseEncryptionKeyResponse(); + default: return super::ParsePacket(a_PacketType); // off-load previously known packets into cProtocol125 + case PACKET_LOCALE_VIEW_DISTANCE: return ParseLocaleViewDistance(); + case PACKET_CLIENT_STATUSES: return ParseClientStatuses(); + case PACKET_ENCRYPTION_KEY_RESP: return ParseEncryptionKeyResponse(); } } -- cgit v1.2.3