From b3bc6cb2bd78a87ae206feb2865c07c299dad168 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 17:56:45 +0000 Subject: [PATCH] Decompile 3 functions in Source/Client/Mode/GameModeNotices.cpp Batch #12534 by Yommy: 0 byte-identical, 3 confirmed by peer review. - fn_22126 CGameMode::ReceiveItemDropEntry: logic confirmed by peer review - fn_21851 CGameMode::ReceiveQuestHuntUpdate: logic confirmed by peer review - fn_21852 CGameMode::ReceiveQuestHuntUpdate2: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, cremane, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/GameModeNotices.cpp | 60 ++++++++++++-------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/Source/Client/Mode/GameModeNotices.cpp b/Source/Client/Mode/GameModeNotices.cpp index 91358d6e..f98250c7 100644 --- a/Source/Client/Mode/GameModeNotices.cpp +++ b/Source/Client/Mode/GameModeNotices.cpp @@ -4582,8 +4582,8 @@ void CGameMode::ReceiveItemDropEntry(const unsigned char* data) { 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); + const std::int64_t entryAddress = reinterpret_cast(&entry); + item->SendMsg(nullptr, 4, 0, static_cast(entryAddress), static_cast(entryAddress >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } #pragma pack(push, 1) struct SpriteChangePacket { @@ -5597,23 +5597,21 @@ void CGameMode::ReceiveQuestHuntUpdate(const unsigned char* data) { break; } } - if (index >= 3) { - continue; - } + if (index < 3) { + info.m_huntUnknown00E0[index] = entry.count; + info.m_huntUnknown0180[index] = entry.maxCount; + notices.push_back(this->HuntTargetText(info, index)); - info.m_huntUnknown00E0[index] = entry.count; - info.m_huntUnknown0180[index] = entry.maxCount; - notices.push_back(this->HuntTargetText(info, index)); - - std::string name; - if (info.m_huntUnknown00D4[index] == 0x7CFF) { - name.assign(g_renewQuestMgr->GetMonsterConditionText(info.m_huntUnknown01A0[index], info.m_huntUnknown01AC[index], info.m_huntUnknown01B2[index])); - } else { - name.assign(info.m_huntName[index]); + std::string name; + if (info.m_huntUnknown00D4[index] == 0x7CFF) { + name.assign(g_renewQuestMgr->GetMonsterConditionText(info.m_huntUnknown01A0[index], info.m_huntUnknown01AC[index], info.m_huntUnknown01B2[index])); + } else { + name.assign(info.m_huntName[index]); + } + name.assign(FormatOwnedString(LookupMessage(1610), info.m_title.c_str(), name.c_str(), info.m_huntUnknown00E0[index], entry.maxCount)); + g_windowMgr.SendNotice(1, reinterpret_cast(name.c_str()), 0xFFFF, 19, 0, 0); + g_renewQuestMgr->SetOngoingQuest(entry.questId, info); } - name.assign(FormatOwnedString(LookupMessage(1610), info.m_title.c_str(), name.c_str(), info.m_huntUnknown00E0[index], entry.maxCount)); - g_windowMgr.SendNotice(1, reinterpret_cast(name.c_str()), 0xFFFF, 19, 0, 0); - g_renewQuestMgr->SetOngoingQuest(entry.questId, info); } if (!notices.empty()) { @@ -5645,23 +5643,21 @@ void CGameMode::ReceiveQuestHuntUpdate2(const unsigned char* data) { break; } } - if (index >= 3) { - continue; - } + if (index < 3) { + info.m_huntUnknown00E0[index] = entry.count; + info.m_huntUnknown0180[index] = entry.maxCount; + notices.push_back(this->HuntTargetText(info, index)); - info.m_huntUnknown00E0[index] = entry.count; - info.m_huntUnknown0180[index] = entry.maxCount; - notices.push_back(this->HuntTargetText(info, index)); - - std::string name; - if (info.m_huntUnknown00D4[index] == 0x7CFF) { - name.assign(g_renewQuestMgr->GetMonsterConditionText(info.m_huntUnknown01A0[index], info.m_huntUnknown01AC[index], info.m_huntUnknown01B2[index])); - } else { - name.assign(info.m_huntName[index]); + std::string name; + if (info.m_huntUnknown00D4[index] == 0x7CFF) { + name.assign(g_renewQuestMgr->GetMonsterConditionText(info.m_huntUnknown01A0[index], info.m_huntUnknown01AC[index], info.m_huntUnknown01B2[index])); + } else { + name.assign(info.m_huntName[index]); + } + name.assign(FormatOwnedString(LookupMessage(1610), info.m_title.c_str(), name.c_str(), info.m_huntUnknown00E0[index], entry.maxCount)); + g_windowMgr.SendNotice(1, reinterpret_cast(name.c_str()), 0xFFFF, 19, 0, 0); + g_renewQuestMgr->SetOngoingQuest(entry.questId, info); } - name.assign(FormatOwnedString(LookupMessage(1610), info.m_title.c_str(), name.c_str(), info.m_huntUnknown00E0[index], entry.maxCount)); - g_windowMgr.SendNotice(1, reinterpret_cast(name.c_str()), 0xFFFF, 19, 0, 0); - g_renewQuestMgr->SetOngoingQuest(entry.questId, info); } if (!notices.empty()) {