From c88751e2e512cdffd8a6fc22756f0c58b8769892 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 01:10:41 +0000 Subject: [PATCH] Decompile fn_07733 (UIMiniPartyInfoWnd::Slot28) Batch #6530 by gordaoprogramas: 0 byte-identical, 1 confirmed by peer review. - fn_07733 UIMiniPartyInfoWnd::Slot28: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, willerthal, superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Party/UIMiniPartyWnd.cpp | 38 ++++++++++++++++++++++++++++++ Source/UI/Party/UIMiniPartyWnd.h | 1 + 2 files changed, 39 insertions(+) diff --git a/Source/UI/Party/UIMiniPartyWnd.cpp b/Source/UI/Party/UIMiniPartyWnd.cpp index 36dbd7e7..99d9acb0 100644 --- a/Source/UI/Party/UIMiniPartyWnd.cpp +++ b/Source/UI/Party/UIMiniPartyWnd.cpp @@ -1,4 +1,7 @@ #include "UI/Party/UIMiniPartyWnd.h" +#include "Client/Mode/ModeMgr.h" +#include "Client/Mode/ModeTooltip.h" +#include "Contents/MapInfoMgr.h" #include "Client/Session.h" #include "Contents/MessageTable.h" #include "Contents/Messenger/ClientMessenger.h" @@ -12,6 +15,9 @@ #include #include +#include +#include + // OFFSET: 0x007426F0 // FUNCTION: fn_07737 UIMiniPartyWnd::UIMiniPartyWnd(UIWindowContext& windowContext, UIFrameContext& frameContext) @@ -78,6 +84,38 @@ void UIMiniPartyInfoWnd::Slot31(int x, int y) { } } +// OFFSET: 0x00740D40 +// FUNCTION: fn_07733 +void UIMiniPartyInfoWnd::Slot28(int, int) { + ModeTooltip* mode = reinterpret_cast(g_modeMgr.GetGameMode()); + if (!mode) { + return; + } + + if (this->m_owner->GetMember().valid == 0) { + return; + } + + char text[256]; + std::memset(text, 0, sizeof(text)); + std::string fitted; + const std::string mapName = g_mapInfoMgr->GetDisplayName(std::string(this->m_owner->GetMember().map.c_str())); + if (this->m_owner->m_sizeMode == 1) { + std::sprintf(text, "%s", this->m_owner->GetMember().name.c_str()); + fitted = this->FitDisplayText(static_cast(static_cast(this->geometry.width) * 0.532f), text, 0, 12, 1); + } else { + std::sprintf(text, "Lv.%d %s(%s)", this->m_owner->GetMember().level, this->m_owner->GetMember().name.c_str(), mapName.c_str()); + fitted = this->FitDisplayText(static_cast(static_cast(this->geometry.width) * 0.6f), text, 0, 12, 1); + } + + if (fitted.find(text) == std::string::npos) { + int x = this->geometry.x + 15; + int y = this->geometry.y - 12; + this->ToScreen(x, y); + mode->Show(text, x, y, 0xFFFFFFFF, 0, 1); + } +} + // OFFSET: 0x00741280 // FUNCTION: fn_07734 void UIMiniPartyInfoWnd::Slot33(int, int) { diff --git a/Source/UI/Party/UIMiniPartyWnd.h b/Source/UI/Party/UIMiniPartyWnd.h index 4d959c40..d5c9fcdf 100644 --- a/Source/UI/Party/UIMiniPartyWnd.h +++ b/Source/UI/Party/UIMiniPartyWnd.h @@ -21,6 +21,7 @@ class UIMiniPartyInfoWnd : public UIFrameWnd { public: UIMiniPartyInfoWnd(UIWindowContext& windowContext, UIFrameContext& frameContext); void Slot15(int width, int height) override; + void Slot28(int x, int y) override; void Slot31(int x, int y) override; void Slot33(int x, int y) override;