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);