From c2e0ca4e6eb4aaf6ee3a0077547cb59aa4bb7db4 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 01:22:10 +0000 Subject: [PATCH] Decompile 2 functions in Source/Client/Mode/GameModeNotices.cpp Batch #17616 by eAthena: 2 byte-identical, 0 confirmed by peer review. - fn_22137 CGameMode::ReceiveWindow227Entries: byte-identical - fn_22142 CGameMode::ReceiveNavigation: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Client/Mode/GameModeNotices.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Source/Client/Mode/GameModeNotices.cpp b/Source/Client/Mode/GameModeNotices.cpp index b3f124ad9..c897d3aa9 100644 --- a/Source/Client/Mode/GameModeNotices.cpp +++ b/Source/Client/Mode/GameModeNotices.cpp @@ -3687,19 +3687,22 @@ void CGameMode::ReceiveLongParChange(const unsigned char* data) { // OFFSET: 0x00D73A10 // FUNCTION: fn_22142 void CGameMode::ReceiveNavigation(const unsigned char* packet) { - const int value = packet[3]; - unsigned char group = value >= 100; - int code = value >= 100 ? value - 100 : value; + int code = packet[3]; + unsigned char group = 0; + if (code >= 100) { + group = 1; + code -= 100; + } if (code >= 10) { group += 2; code -= 10; } const unsigned char mode = code >= 1 ? group + 4 : group; - const int x = *reinterpret_cast(packet + 0x15); - const int y = *reinterpret_cast(packet + 0x17); - const int id = *reinterpret_cast(packet + 0x19); - g_navigationManager.StartNavigation(std::string(reinterpret_cast(packet + 5)), packet[2], mode, *reinterpret_cast(packet + 4), x, y, id); + g_navigationManager.StartNavigation( + std::string(reinterpret_cast(packet + 5)), packet[2], mode, *reinterpret_cast(packet + 4), + *reinterpret_cast(packet + 0x15), *reinterpret_cast(packet + 0x17), *reinterpret_cast(packet + 0x19) + ); } // OFFSET: 0x00D73AF0 @@ -4552,8 +4555,9 @@ void CGameMode::ReceiveWindow227Entries(const unsigned char* data) { return; } - std::vector entries; - entries.insert(entries.end(), packet->entries, packet->entries + count); + std::vector entries; + const char* first = reinterpret_cast(packet->entries); + entries.insert(entries.end(), first, first + count * sizeof(std::uint16_t)); UIWindow* window = g_windowMgr.EnsureWindow(WID_MERGEITEMWND); if (window) { window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(entries.data()), count, 0, 0);