From 551b60afdd556bb2c39b7ff9f179bd39c15ff74c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 17:35:03 +0000 Subject: [PATCH] Decompile fn_21724 (CGameMode::ReceiveItemFallEntry) Batch #8421 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_21724 CGameMode::ReceiveItemFallEntry: logic confirmed by peer review Peer-reviewed-by: Yommy, Romain, System4z Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/GameModePackets.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index f262e51a..9eeddbac 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -6035,3 +6035,27 @@ struct ItemFallEntry { }; // OFFSET: 0x00D2DB80 +// FUNCTION: fn_21724 +void CGameMode::ReceiveItemFallEntry(const unsigned char* packet) { + ItemFallEntry entry = {}; + entry.count = *reinterpret_cast(packet + 0x0F); + entry.aid = *reinterpret_cast(packet + 2); + entry.column = *reinterpret_cast(packet + 0x0B); + entry.row = *reinterpret_cast(packet + 0x0D); + entry.subColumn = packet[0x11]; + entry.subRow = packet[0x12]; + entry.falling = 0; + _itoa(*reinterpret_cast(packet + 6), entry.itemId, 10); + entry.falling = 0; + entry.identified = packet[0x0A]; + + CItem* item = this->scene->GetItemByAID(*reinterpret_cast(packet + 2)); + if (!item) { + item = new CItem; + this->scene->objects.push_back(item); + this->scene->unknown_0018.push_back(item); + } + + const int entryAddress = reinterpret_cast(&entry); + item->SendMsg(nullptr, 4, 0, entryAddress, entryAddress >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +}