From 04662f3c3eaa32c34fb3923031bd686610e607bd Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 4 Nov 2026 22:34:40 +0000 Subject: [PATCH] Decompile 2 functions in Source/Network/Packets/PacketLengths.cpp Batch #11222 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_18385 PacketLengths::Register: logic confirmed by peer review - fn_20391 PacketLengths::FixedLength: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke, StrawberrysherbetIX Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Network/Packets/PacketLengths.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Network/Packets/PacketLengths.cpp b/Source/Network/Packets/PacketLengths.cpp index 966968c7..b54b98c8 100644 --- a/Source/Network/Packets/PacketLengths.cpp +++ b/Source/Network/Packets/PacketLengths.cpp @@ -27,11 +27,11 @@ PacketLengthResult PacketLengths::Lookup(int id) const { // OFFSET: 0x00C7C970 // FUNCTION: fn_20391 int PacketLengths::FixedLength(int id) const { - if (id == 703) { + switch (id) { + case 703: return 12; - } - if (id == 704) { + case 704: return 4; } @@ -74,7 +74,7 @@ PacketLengths::~PacketLengths() { // OFFSET: 0x00B02100 // FUNCTION: fn_18385 void PacketLengths::Register(int id, int length, int variable, int record) { - this->m_values.try_emplace(id, PacketLengthValue{length, variable, record}); + this->m_values.insert(std::make_pair(id, PacketLengthValue{length, variable, record})); } // OFFSET: 0x00B02210