From 81bfea8dcf6c75b32804b82f6ae00296103dabfc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 20:40:14 +0000 Subject: [PATCH] Decompile 9 functions in Source/Client/Mode/GameModePackets.cpp, Source/Client/Mode/CGameMode.h Batch #6104 by superintelligence: 4 byte-identical, 5 confirmed by peer review. - fn_21744 CGameMode::IgnorePacket473: byte-identical - fn_21750 CGameMode::IgnorePacket474: byte-identical - fn_21775 CGameMode::ClearUnknown0244: byte-identical - fn_21978 CGameMode::IgnorePacket478: byte-identical - fn_21688 CGameMode::ReceiveActorStatusBlock: logic confirmed by peer review - fn_21689 CGameMode::ReceiveActorStatusUpdate: logic confirmed by peer review - fn_21890 CGameMode::ReceiveActorTitle: logic confirmed by peer review - fn_21980 CGameMode::ReceiveActorInt64Pair: logic confirmed by peer review - fn_21981 CGameMode::ReceiveActorInt8: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag, Yommy Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/CGameMode.h | 9 +++ Source/Client/Mode/GameModePackets.cpp | 92 ++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index d975650e0..d8fd2bc1c 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -134,6 +134,15 @@ public: void ReceiveActorSequenceDeadline(const unsigned char* packet); void ReceiveActorSignal(const unsigned char* packet); void IgnorePacket(const unsigned char* packet); + void IgnorePacket473(const unsigned char* packet); + void IgnorePacket474(const unsigned char* packet); + void IgnorePacket478(const unsigned char* packet); + void ClearUnknown0244(const unsigned char* packet); + void ReceiveActorStatusBlock(const unsigned char* packet); + void ReceiveActorStatusUpdate(const unsigned char* packet); + void ReceiveActorTitle(const unsigned char* packet); + void ReceiveActorInt8(const unsigned char* packet); + void ReceiveActorInt64Pair(const unsigned char* packet); void ReceiveItem1738EquipList(const unsigned char* packet); void ReceiveItem1738EquipListOptions(const unsigned char* packet); void ReceiveItem1738NormalList(const unsigned char* packet); diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index 06e76fd9e..ec7874e94 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -952,3 +952,95 @@ void CGameMode::ReceiveWindow17Entries(const unsigned char* packet) { g_windowMgr.unknown_01F0->SendMsg(nullptr, 32, 0, 0, 0, 0); } } + +// OFFSET: 0x00D32820 +// FUNCTION: fn_21744 +void CGameMode::IgnorePacket473(const unsigned char*) { +} + +// OFFSET: 0x00D33970 +// FUNCTION: fn_21750 +void CGameMode::IgnorePacket474(const unsigned char*) { +} + +// OFFSET: 0x00D61290 +// FUNCTION: fn_21978 +void CGameMode::IgnorePacket478(const unsigned char*) { +} + +// OFFSET: 0x00D3A1D0 +// FUNCTION: fn_21775 +void CGameMode::ClearUnknown0244(const unsigned char*) { + *reinterpret_cast(this->unknown_01F8 + 0x4C) = 0; +} + +// OFFSET: 0x00D272A0 +// FUNCTION: fn_21688 +void CGameMode::ReceiveActorStatusBlock(const unsigned char* packet) { + g_session.SetUnknown5BC0(*reinterpret_cast(packet + 2)); + g_session.unknown_5BC4 = *reinterpret_cast(packet + 6); + g_session.unknown_5BC8 = *reinterpret_cast(packet + 0xE); + g_session.unknown_5BCC = *reinterpret_cast(packet + 0xA); + g_session.unknown_5BD0 = *reinterpret_cast(packet + 0x12); + if (CRenderObject* actor = this->scene->GetGameActorByAID(*reinterpret_cast(packet + 2))) { + actor->SendMsg(nullptr, 0x22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + } +} + +// OFFSET: 0x00D27320 +// FUNCTION: fn_21689 +void CGameMode::ReceiveActorStatusUpdate(const unsigned char* packet) { + if (g_session.unknown_5BC0 != -1) { + const unsigned int field = *reinterpret_cast(packet + 2) - 5; + switch (field) { + case 0: + g_session.unknown_5BC4 = *reinterpret_cast(packet + 4); + break; + case 1: + g_session.unknown_5BCC = *reinterpret_cast(packet + 4); + break; + case 2: + g_session.unknown_5BC8 = *reinterpret_cast(packet + 4); + break; + case 3: + g_session.unknown_5BD0 = *reinterpret_cast(packet + 4); + break; + } + if (CRenderObject* actor = this->scene->GetGameActorByAID(g_session.unknown_5BC0)) { + actor->SendMsg(nullptr, 0x22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + } + } +} + +// OFFSET: 0x00D51A90 +// FUNCTION: fn_21890 +void CGameMode::ReceiveActorTitle(const unsigned char* packet) { + char text[81]; + std::strncpy(text, reinterpret_cast(packet + 6), 80); + text[80] = '\0'; + if (CRenderObject* actor = this->scene->GetGameActorByAID(*reinterpret_cast(packet + 2))) { + const std::int64_t value = reinterpret_cast(text); + actor->SendMsg(nullptr, 0x37, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + } +} + +// OFFSET: 0x00D61340 +// FUNCTION: fn_21981 +void CGameMode::ReceiveActorInt8(const unsigned char* packet) { + if (CRenderObject* actor = this->scene->GetGameActorByAID(*reinterpret_cast(packet + 2))) { + const std::int64_t value = *reinterpret_cast(packet + 6); + actor->SendMsg(nullptr, 0x91, 0, static_cast(value), static_cast(value >> 32), 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0); + } +} + +// OFFSET: 0x00D612F0 +// FUNCTION: fn_21980 +void CGameMode::ReceiveActorInt64Pair(const unsigned char* packet) { + if (CRenderObject* actor = this->scene->GetGameActorByAID(*reinterpret_cast(packet + 2))) { + const std::int64_t first = *reinterpret_cast(packet + 6); + const std::int64_t second = *reinterpret_cast(packet + 0xA); + actor->SendMsg( + nullptr, 0x91, 0, static_cast(first), static_cast(first >> 32), static_cast(second), static_cast(second >> 32), 0, 0, 0, 0, 0, 0, 0, 0 + ); + } +}