From cbb3810eaf32f48c29092708d0ef8dbc872ef4bc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 12:57:51 +0000 Subject: [PATCH] Decompile 4 functions in Source/UI/Macro/UICaptchaPreviewWnd.cpp, Source/UI/Navigation/NavigationLink.cpp, ... Batch #17039 by eAthena: 3 byte-identical, 1 confirmed by peer review. - fn_09315 UIRequestJoinPartyWnd::SendMsg: logic confirmed by peer review - fn_09980 UIRenewQuestWnd::RefreshQuestLists: byte-identical - fn_12764 UINavigationWnd::LoadRoute: byte-identical (already on main) - fn_12757 UISeekPartyWnd::SendMsg: byte-identical Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Macro/UICaptchaPreviewWnd.cpp | 8 ++++++++ Source/UI/Navigation/NavigationLink.cpp | 3 +++ Source/UI/Party/UIRegisterPartyWnd.cpp | 4 ++++ Source/UI/Party/UIRequestJoinPartyWnd.cpp | 3 +-- Source/UI/Quest/UIRenewQuestWnd.cpp | 6 +++--- Source/UI/Repute/UIReputeWnd.cpp | 3 +++ Source/UI/Shortcuts/ShortcutCooldowns.cpp | 20 ++++++++++++++++++-- Source/UI/Shortcuts/UIShortCutWnd.cpp | 2 ++ Source/UI/Text/UITagTextViewer.cpp | 3 +-- 9 files changed, 43 insertions(+), 9 deletions(-) diff --git a/Source/UI/Macro/UICaptchaPreviewWnd.cpp b/Source/UI/Macro/UICaptchaPreviewWnd.cpp index 0c78211a0..8e98283e3 100644 --- a/Source/UI/Macro/UICaptchaPreviewWnd.cpp +++ b/Source/UI/Macro/UICaptchaPreviewWnd.cpp @@ -19,6 +19,14 @@ #include #include +namespace { +#pragma pack(push, 1) +struct MacroDetectorImageReceivedPacket { + /* 0000 */ std::int16_t id; +}; +#pragma pack(pop) +} + // OFFSET: 0x007ED2F0 // FUNCTION: fn_09808 void UICaptchaPreviewWnd::AddImageData(const void* data, int size) { diff --git a/Source/UI/Navigation/NavigationLink.cpp b/Source/UI/Navigation/NavigationLink.cpp index f486f8b14..ebbf5e74f 100644 --- a/Source/UI/Navigation/NavigationLink.cpp +++ b/Source/UI/Navigation/NavigationLink.cpp @@ -55,6 +55,9 @@ #include "Utility/Text/TextTokens.h" #include "Resource/MSGSTRINGID.h" +#include + +extern template std::vector::~vector(); extern template std::string::basic_string(std::_String_constructor_concat_tag, const std::string&, const char*, std::size_t, const char*, std::size_t); namespace LineCutter { diff --git a/Source/UI/Party/UIRegisterPartyWnd.cpp b/Source/UI/Party/UIRegisterPartyWnd.cpp index 83230d8fb..c92ed160f 100644 --- a/Source/UI/Party/UIRegisterPartyWnd.cpp +++ b/Source/UI/Party/UIRegisterPartyWnd.cpp @@ -28,6 +28,10 @@ #include #include #include +#include +#include + +extern template std::vector::~vector(); namespace { // OFFSET: 0x007BBFC0 diff --git a/Source/UI/Party/UIRequestJoinPartyWnd.cpp b/Source/UI/Party/UIRequestJoinPartyWnd.cpp index 8dca0815f..4dd1bb3e9 100644 --- a/Source/UI/Party/UIRequestJoinPartyWnd.cpp +++ b/Source/UI/Party/UIRequestJoinPartyWnd.cpp @@ -145,8 +145,7 @@ int UIRequestJoinPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t char level[5] = {}; _snprintf_s(level, sizeof(level), _TRUNCATE, "%d", this->level); this->levelText->SetText(level, 0); - const int width = this->TextWidth(level, 0, 0, 12, 0, 0); - this->levelText->Move(25 - width / 2, 56); + this->levelText->Move(25 - this->TextWidth(level, 0, 0, 12, 0, 0) / 2, 56); this->details->Clear(); char messageText[1024] = {}; _snprintf_s(messageText, sizeof(messageText), _TRUNCATE, LookupMessage(MSI_EXIT), request.name); diff --git a/Source/UI/Quest/UIRenewQuestWnd.cpp b/Source/UI/Quest/UIRenewQuestWnd.cpp index bb3a9fc5b..d658b2207 100644 --- a/Source/UI/Quest/UIRenewQuestWnd.cpp +++ b/Source/UI/Quest/UIRenewQuestWnd.cpp @@ -968,7 +968,7 @@ void UIRenewQuestWnd::RefreshQuestLists(int type, unsigned int questId) { this->m_questIds[2].clear(); this->m_questIds[3].clear(); CRenewQuestMgr* mgr = g_renewQuestMgr; - for (auto it = mgr->m_ongoingQuests.begin(); it != mgr->m_ongoingQuests.end(); ++it) { + for (auto it = mgr->m_ongoingQuests.begin(); mgr->m_ongoingQuests.end() != it; ++it) { if (it->second.questType == 1) { this->m_questIds[3].push_back(it->first); } else if (it->second.m_state == 1) { @@ -982,12 +982,12 @@ void UIRenewQuestWnd::RefreshQuestLists(int type, unsigned int questId) { if (type == 0 || type == 2) { this->m_questIds[1].clear(); CRenewQuestMgr* mgr = g_renewQuestMgr; - for (auto it = mgr->m_recommendedQuests.begin(); it != mgr->m_recommendedQuests.end(); ++it) { + for (auto it = mgr->m_recommendedQuests.begin(); mgr->m_recommendedQuests.end() != it; ++it) { if (it->second.m_state == 1) { this->m_questIds[1].push_back(it->first); } } - for (auto it = mgr->m_recommendedQuests.begin(); it != mgr->m_recommendedQuests.end(); ++it) { + for (auto it = mgr->m_recommendedQuests.begin(); mgr->m_recommendedQuests.end() != it; ++it) { if (it->second.m_state == 0) { this->m_questIds[1].push_back(it->first); } diff --git a/Source/UI/Repute/UIReputeWnd.cpp b/Source/UI/Repute/UIReputeWnd.cpp index 333b46b92..37da15078 100644 --- a/Source/UI/Repute/UIReputeWnd.cpp +++ b/Source/UI/Repute/UIReputeWnd.cpp @@ -22,6 +22,9 @@ #include #include #include +#include + +extern template std::vector::~vector(); // GLOBAL: gl_25000 template <> diff --git a/Source/UI/Shortcuts/ShortcutCooldowns.cpp b/Source/UI/Shortcuts/ShortcutCooldowns.cpp index 9c879517b..0835e74b6 100644 --- a/Source/UI/Shortcuts/ShortcutCooldowns.cpp +++ b/Source/UI/Shortcuts/ShortcutCooldowns.cpp @@ -110,6 +110,21 @@ struct CooldownSnapshotPacket { /* 0002 */ std::int16_t size; /* 0004 */ CooldownSnapshotEntry entries[1]; }; + +struct CooldownRecordEntry { + /* 0000 */ std::uint16_t id; + /* 0002 */ std::uint32_t remaining; +}; + +struct CooldownRecordPacket { + /* 0000 */ std::int16_t type; + /* 0002 */ std::int16_t size; + /* 0004 */ CooldownRecordEntry entries[1]; +}; + +struct SeekPartyClosePacket { + /* 0000 */ std::int16_t id; +}; #pragma pack(pop) // OFFSET: 0x00D42070 @@ -587,8 +602,9 @@ int UISeekPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen case UM_COMMAND: switch (argument1) { case ID_CLOSE: { - std::int16_t packetType = 0x806; - GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packetType), &packetType); + SeekPartyClosePacket packet; + packet.id = 0x806; + GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); g_windowMgr.CloseWindow(WID_JOBLISTWND); break; } diff --git a/Source/UI/Shortcuts/UIShortCutWnd.cpp b/Source/UI/Shortcuts/UIShortCutWnd.cpp index b263dea26..a826fa96e 100644 --- a/Source/UI/Shortcuts/UIShortCutWnd.cpp +++ b/Source/UI/Shortcuts/UIShortCutWnd.cpp @@ -71,6 +71,8 @@ #include "Resource/MSGSTRINGID.h" #include "Network/Packets/PacketId.h" +extern template std::string* std::_Move_unchecked(std::string*, std::string*, std::string*); + namespace { #pragma pack(push, 1) struct MemorialDungeonCommandPacket { diff --git a/Source/UI/Text/UITagTextViewer.cpp b/Source/UI/Text/UITagTextViewer.cpp index 76e58c678..7c0070551 100644 --- a/Source/UI/Text/UITagTextViewer.cpp +++ b/Source/UI/Text/UITagTextViewer.cpp @@ -12,8 +12,7 @@ // FUNCTION: fn_10515 UITagTextViewer::UITagTextViewer() : UIScroll(), m_backgroundColor(0xFFFFFF), m_textWidth(0), m_lineSpacing(6), m_margin(3), m_topMargin(4), m_font{0, 12, 0, 0}, m_outlined(false), - m_outlineColor(0xFFFFFF), m_horizontalAlign(0), m_verticalAlign(3), m_cursorY(0) { - m_offsetY = m_topMargin; + m_outlineColor(0xFFFFFF), m_horizontalAlign(0), m_verticalAlign(3), m_cursorY(0), m_offsetY(m_topMargin) { } // OFFSET: 0x0083E740