Decompile 4 functions in Source/Contents/Jobs/JobInheritance.cpp, Source/Contents/Jobs/JobInheritance.h, ...

Batch #1470 by ragnarok-clanker: 0 byte-identical, 4 confirmed by peer review.

- fn_23590 IsVisibleJob: logic confirmed by peer review
- fn_23841 GetWeaponViewValue: logic confirmed by peer review
- fn_23906 ResetHotkeySlots: logic confirmed by peer review
- fn_23910 CSession::SetPairValue: logic confirmed by peer review

Peer-reviewed-by: Kisuka, eAthena
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-28 14:13:00 +00:00
commit 447fa8b9f6
3 changed files with 87 additions and 1 deletions

View file

@ -93,7 +93,9 @@ public:
/* 5558 */ int unknown_5558;
/* 555C */ unsigned char unknown_555C[0x47C];
/* 59D8 */ LuaScript* m_hotkeyScript;
/* 59DC */ unsigned char unknown_59DC[0x28C];
/* 59DC */ unsigned char unknown_59DC[0x218];
/* 5BF4 */ int m_pairValues[3];
/* 5C00 */ unsigned char unknown_5C00[0x68];
/* 5C68 */ ItemInfo unknown_5C68[5];
/* 6140 */ std::uint16_t unknown_6140;
/* 6144 */ std::map<int, SessionRecord6144> unknown_6144;
@ -124,6 +126,14 @@ public:
void ClearUnknown1740(int id);
void ClearUnknown1738(int id);
std::uint32_t SyncServerTime(std::uint32_t serverTime);
std::pair<int, int>* InsertPair(int key, int value);
int SetPairValue(int value, int slot);
int SetHotkeyEntry(char enabled, int id, int value, int slot);
int SetFlag(char value);
// INLINED
NormalItemSlot& SkillHotkey(int index) {
return reinterpret_cast<NormalItemSlot*>(reinterpret_cast<unsigned char*>(this) + offsetof(CSession, unknown_06EB))[index];
}
int GetPetFood(int job);
void GetPetIllustName(int job, int, char* buffer);
int GetPetJobByEggItem(int eggItemId);
@ -178,6 +188,7 @@ static_assert(offsetof(SessionRecord6144, unknown_0030) == 0x30);
static_assert(offsetof(CSession, m_additionalSkills) == 0x4);
static_assert(offsetof(CSession, m_level) == 0x1650);
static_assert(offsetof(CSession, m_hotkeyPage) == 0xBC);
static_assert(offsetof(CSession, m_pairValues) == 0x5BF4);
static_assert(offsetof(CSession, m_hotkeyDescriptions) == 0xC0);
static_assert(offsetof(CSession, m_serverTimeOffset) == 0x794);
static_assert(offsetof(CSession, m_serverTimeAdjustCount) == 0x798);

View file

@ -1,9 +1,15 @@
#include "Client/Mode/ActiveGameMode.h"
#include "Client/Mode/CMode.h"
#include "Contents/Items/ItemDescription.h"
#include "Contents/Skills/SkillInfo.h"
#include "Client/Session.h"
#include "Contents/Jobs/JobInheritance.h"
#include "Contents/Jobs/JobId.h"
#include "Contents/Skills/PlayerSkillBundle.h"
#include "Script/LuaScript.h"
#include <string>
namespace {
// OFFSET: 0x00DFBC00
// FUNCTION: fn_23585
@ -125,3 +131,61 @@ int __stdcall GetRealWeaponId(int weapon) {
}
return weapon;
}
// OFFSET: 0x00DFB4B0
// OFFSET: 0x00DFBE10
// FUNCTION: fn_23590
bool __stdcall IsVisibleJob(int job) {
return job != JT_WARPNPC && job != JT_EFFECTLAUNCHER && job != JT_HIDDEN_NPC;
}
// OFFSET: 0x00E19230
// OFFSET: 0x00E19530
// FUNCTION: fn_23841
int __stdcall GetWeaponViewValue(int weapon) {
const int value = FindItemDescription(weapon).unknown_0040;
if (weapon > 2100 && weapon < 2200 || static_cast<unsigned>(weapon - 28901) <= 0x61 || static_cast<unsigned>(weapon - 460000) <= 0x270F) {
return -1;
}
return value;
}
// OFFSET: 0x00E248F0
// OFFSET: 0x00E25970
// FUNCTION: fn_23906
bool ResetHotkeySlots() {
g_session.m_hotkeyScript->Call("ResetTheHotKey", "dddd", 1, 132, 192, 18);
return g_session.m_hotkeyScript->Call("ResetTheHotKey", "dddd", 1, 135, 36, 18);
}
// OFFSET: 0x00E25E60
// OFFSET: 0x00E25EE0
// FUNCTION: fn_23910
int CSession::SetPairValue(int value, int slot) {
if (slot == 0) {
this->m_pairValues[0] = value;
return value;
}
if (slot == 1) {
this->m_pairValues[1] = value;
return value;
}
if (slot == 2) {
this->m_pairValues[2] = value;
return value;
}
return slot;
}
// OFFSET: 0x00E25F20
// OFFSET: 0x00E26030

View file

@ -12,4 +12,15 @@ struct JobInheritance {
void InitializeSkillTree(CPlayerSkillBundle& bundle, int job);
};
#include <cstdint>
#include <string>
bool __stdcall IsVisibleJob(int job);
int __stdcall GetWeaponViewValue(int weapon);
int __stdcall GetDualWieldWeaponType(int first, int second);
bool __stdcall IsJobWeaponAllowed(int job, int slot, std::int64_t weapon);
int __stdcall GetRealWeaponId(int weapon);
std::string GetJobTitleString(int job);
bool ResetHotkeySlots();
#endif