From 33e6e1fc77e5cdfc072fc2a6517403dd0452ada3 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 13:24:00 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Window/UIWindowMgr.cpp, Source/UI/Window/UIWindowMgr.h, ... Batch #7991 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_17127 UIWindowMgr::RefreshFrameSkins: logic confirmed by peer review - fn_24159 SerializeMessengerMembers: logic confirmed by peer review Peer-reviewed-by: Yommy, pedrao Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Session.cpp | 11 +++++++++++ Source/Client/Session.h | 1 + Source/UI/Window/UIWindowMgr.cpp | 16 ++++++++++++++++ Source/UI/Window/UIWindowMgr.h | 1 + 4 files changed, 29 insertions(+) diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index 04510c36..9c4ab8d7 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -2741,3 +2741,14 @@ void CSession::InitJobKeyNames() { names[358] = "SPIRIT_HANDLER"; names[365] = "SPIRIT_HANDLER_RIDING"; } + +// OFFSET: 0x00E2F860 +// FUNCTION: fn_24159 +std::vector SerializeMessengerMembers(const std::list& members) { + std::vector records; + for (std::list::const_iterator it = members.begin(); it != members.end(); ++it) { + const std::vector record = it->Serialize(); + records.insert(records.end(), record.begin(), record.end()); + } + return records; +} diff --git a/Source/Client/Session.h b/Source/Client/Session.h index bc90f4c6..b66424f6 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -933,6 +933,7 @@ bool IsAdminAccount(int aid); bool IsMonsterJob(int job); int MonsterJobColor(int job); void SetMemberFlags(std::uint32_t* flags); +std::vector SerializeMessengerMembers(const std::list& members); #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(SessionRecord6144) == 0x38); diff --git a/Source/UI/Window/UIWindowMgr.cpp b/Source/UI/Window/UIWindowMgr.cpp index 252e6862..73200c2e 100644 --- a/Source/UI/Window/UIWindowMgr.cpp +++ b/Source/UI/Window/UIWindowMgr.cpp @@ -46,6 +46,8 @@ #include #include #include "Render/Textures/Surface.h" +#include "UI/FrameSkin.h" +#include "UI/Window/UIRegisterMgr.h" namespace { #pragma pack(push, 1) struct AddFriendPacket { @@ -850,6 +852,20 @@ void UIWindowMgr::AddWhisperName(const char* name) { } } +// OFFSET: 0x00A8BB20 +// FUNCTION: fn_17127 +void UIWindowMgr::RefreshFrameSkins() { + for (UIWindow* window : this->rendered) { + if (CUIRegisterMgr::s_instance == nullptr) { + CUIRegisterMgr::s_instance = new (std::nothrow) CUIRegisterMgr; + } + std::map& entries = CUIRegisterMgr::s_instance->entries; + if (entries.find(window->geometry.id) != entries.end()) { + static_cast(window)->RefreshSkinColors(); + } + } +} + // OFFSET: 0x00A8B840 // FUNCTION: fn_17124 void UIWindowMgr::RegisterNamedWindow(std::string name, UIWindow* window) { diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index d3a14090..b893f22b 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -519,6 +519,7 @@ public: bool IsHoverOnWindow01C8Button(); void SelectWhisperName(const char* name); void AddWhisperName(const char* name); + void RefreshFrameSkins(); bool HasUnknown030C(); bool IsDropDownChild(const UIWindow* window); bool HasMiniPartyMember(std::uint32_t accountId);