From ea63aff495dc375f3e12c554b0a3d9041f348fb2 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 19:59:47 +0000 Subject: [PATCH] Decompile 4 functions in Source/Client/Session.cpp, Source/Client/Session.h Batch #6058 by superintelligence: 1 byte-identical, 3 confirmed by peer review. - fn_23517 CSession::RefreshMercenaryInfo: logic confirmed by peer review - fn_23519 CSession::IsBlankString: logic confirmed by peer review - fn_23561 CSession::HasNoUnknown1784Items: byte-identical - fn_23573 CSession::HasItem1740Number: logic confirmed by peer review Peer-reviewed-by: Lumen, eAthena, alisonrag, gordaoprogramas Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Session.cpp | 48 +++++++++++++++++++++++++++++++++++++++ Source/Client/Session.h | 4 ++++ 2 files changed, 52 insertions(+) diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index 9b544a9d..fd0bbb59 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -1690,6 +1690,54 @@ void CSession::RefreshHomunculusInfo() { } } +// OFFSET: 0x00DF94D0 +// FUNCTION: fn_23517 +void CSession::RefreshMercenaryInfo() { + if (g_modeMgr.GetGameMode() && g_windowMgr.window_03C8) { + g_windowMgr.window_03C8->Invalidate(); + g_windowMgr.window_03C8->InvalidateChildren(); + } +} + +// OFFSET: 0x00DF9520 +// FUNCTION: fn_23519 +bool CSession::IsBlankString(const char* text) const { + const std::size_t length = std::strlen(text); + if (length == 0) { + return true; + } + + if (text[0] == ' ') { + return true; + } + + return text[length - 1] == ' '; +} + +// OFFSET: 0x00DF9AA0 +// FUNCTION: fn_23561 +bool CSession::HasNoUnknown1784Items() const { + for (int i = 0; i < 11; ++i) { + if (!this->unknown_1784[i].empty()) { + return false; + } + } + + return true; +} + +// OFFSET: 0x00DFA3C0 +// FUNCTION: fn_23573 +bool CSession::HasItem1740Number(int value) const { + for (const ITEM_INFO& item : this->unknown_1740) { + if (std::atoi(item.itemId.c_str()) == value) { + return true; + } + } + + return false; +} + // OFFSET: 0x00DFC0B0 // FUNCTION: fn_23593 void CSession::FlagInventoryItem(std::uint32_t id) { diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 7e1478a5..f289bc21 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -717,6 +717,8 @@ public: void GetSkillActionInfo(int skillId, int& effectId, int& motion, int variant, int level); void GetSkillActionInfo2(int skillId, int& effectId, int& motion); bool IsNumberWithCommas(char* text); + bool HasNoUnknown1784Items() const; + bool HasItem1740Number(int value) const; bool IsRobeDrawOnTop(int action, int frame, bool riding); int GetUnknown8134() const; int FindUnknown0708(int key) const; @@ -785,6 +787,8 @@ public: void RefreshItem1738Window(); void RefreshHpSpWindows(); void RefreshHomunculusInfo(); + void RefreshMercenaryInfo(); + bool IsBlankString(const char* text) const; void EraseRecord0734(int id); void IgnoreText(std::string text); void SaveMiniPartyInfo();