From aebfbfb8c8d623ded8d409d29983a5e871a475bc Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Sat, 2 Sep 2017 11:46:57 -0500 Subject: GetPacketID for protocol packet IDs (#3977) * Added GetPacketId method to protocol, implemented for all protocols. * Moved GetPacketID methods into a single file, alpha-sorted. * Fixed 1.12.1 HandlePacket switch statement. * Added SendLogin to the GetPacketId framework. * Added SpawnObject to GetPacketId framework. * Added missing sendEntityEquipment packet ID update for 1.12.1 * Added LeashEntity packet ID change to 1.12.1 * Alphabetized packet enum, added SpawnGlobalEntity to GetPacketId framework * Fixed clang errors * Indented cases, expanded comment for GetPacketId * Changed dyslexic comment. --- src/Protocol/Protocol_1_10.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Protocol/Protocol_1_10.cpp') diff --git a/src/Protocol/Protocol_1_10.cpp b/src/Protocol/Protocol_1_10.cpp index 7f86d4bdc..bb29c58ce 100644 --- a/src/Protocol/Protocol_1_10.cpp +++ b/src/Protocol/Protocol_1_10.cpp @@ -304,7 +304,7 @@ void cProtocol_1_10_0::SendSoundEffect(const AString & a_SoundName, double a_X, { ASSERT(m_State == 3); // In game mode? - cPacketizer Pkt(*this, 0x19); // Named sound effect packet + cPacketizer Pkt(*this, GetPacketId(sendSoundEffect)); // Named sound effect packet Pkt.WriteString(a_SoundName); Pkt.WriteVarInt32(0); // Master sound category (may want to be changed to a parameter later) Pkt.WriteBEInt32(FloorC(a_X * 8.0)); -- cgit v1.2.3