From b9474e7c82ab45c1d5034c8a1479146affd215fe Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 13:55:33 +0000 Subject: [PATCH] Decompile fn_23379 (CSession::HomunSkillLevel) Batch #1465 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_23379 CSession::HomunSkillLevel: logic confirmed by peer review Peer-reviewed-by: Yommy Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Session.h | 5 ++++- Source/Contents/UserData/CharacterConfigSave.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 02ee6f8..2ac55b9 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -38,7 +38,8 @@ public: /* 06A8 */ unsigned char unknown_06A8[0x43]; /* 06EB */ NormalItemSlot unknown_06EB; /* 06F2 */ NormalItemSlot unknown_06F2; - /* 06F9 */ unsigned char unknown_06F9[0x2F]; + /* 06F9 */ unsigned char unknown_06F9[0x23]; + /* 071C */ std::vector m_homunSkillLevels; /* 0728 */ std::vector m_mercSkillLevels; /* 0734 */ unsigned char unknown_0734[0x44]; /* 0778 */ std::vector> unknown_0778; @@ -124,6 +125,7 @@ public: bool IsReducedSkill(int skillId) const; char* ConvertTooltipText(const char* source, char* output) const; int MercSkillLevel(int skillId) const; + int HomunSkillLevel(int skillId) const; int SyncUnknown0E98(); std::string GetAccessoryName(int id); void CollectCardItems(); @@ -145,6 +147,7 @@ static_assert(offsetof(CSession, m_shortcutSlots) == 0x4B0); static_assert(offsetof(CSession, m_secondaryShortcutSlots) == 0x5AC); static_assert(offsetof(CSession, unknown_06EB) == 0x6EB); static_assert(offsetof(CSession, unknown_06F2) == 0x6F2); +static_assert(offsetof(CSession, m_homunSkillLevels) == 0x71C); static_assert(offsetof(CSession, m_mercSkillLevels) == 0x728); static_assert(offsetof(CSession, unknown_0778) == 0x778); static_assert(offsetof(CSession, unknown_0784) == 0x784); diff --git a/Source/Contents/UserData/CharacterConfigSave.cpp b/Source/Contents/UserData/CharacterConfigSave.cpp index 5fc2bf6..9012dae 100644 --- a/Source/Contents/UserData/CharacterConfigSave.cpp +++ b/Source/Contents/UserData/CharacterConfigSave.cpp @@ -1,3 +1,4 @@ +#include "Client/Session.h" #include "Client/ClientOptions.h" #include "Contents/Async/AsyncWorkMgr.h" #include "Contents/UserData/CharacterConfigSave.h" @@ -92,3 +93,14 @@ void CCharacterLinkedUserDataMgr::Save(CharacterConfigSave& context, const char* ++this->m_pendingSaves; } } + +// OFFSET: 0x00DDD0D0 +// FUNCTION: fn_23379 +int CSession::HomunSkillLevel(int skillId) const { + const int index = skillId - 8000; + if (index > -1) { + return this->m_homunSkillLevels[index]; + } + + return 0; +}