Decompile 2 functions in Source/Contents/Actors/RenderObject.cpp, Source/Contents/Actors/GameActor.h, ...

Batch #3738 by youko: 0 byte-identical, 2 confirmed by peer review.

- fn_21012 CGameActor::IsShapeShifted: logic confirmed by peer review
- fn_21022 CGameActor::ResetJobEffects: logic confirmed by peer review

Peer-reviewed-by: eAthena, meitogi
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-29 23:13:24 +00:00
commit 01c8f45a17
3 changed files with 46 additions and 1 deletions

View file

@ -260,7 +260,10 @@ public:
/* 7EE0 */ std::map<int, RobeAlpha> m_robeAlpha;
/* 7EE8 */ unsigned char unknown_7EE8[4];
/* 7EEC */ int m_maxLevel;
/* 7EF0 */ unsigned char unknown_7EF0[0x8C];
/* 7EF0 */ unsigned char unknown_7EF0[0x7C];
/* 7F6C */ int m_maxLevelEffect4th;
/* 7F70 */ int m_maxLevelEffect4thSub;
/* 7F74 */ unsigned char unknown_7F74[8];
/* 7F7C */ bool m_homunculusAutoFeed;
/* 7F7D */ unsigned char unknown_7F7D[0x2B];
/* 7FA8 */ CInstantVar m_options;
@ -573,6 +576,7 @@ static_assert(offsetof(CSession, m_prohibitionLog) == 0x754);
static_assert(offsetof(SessionRecord6144, unknown_002C) == 0x2C);
static_assert(offsetof(SessionRecord6144, unknown_0030) == 0x30);
static_assert(offsetof(CSession, m_additionalSkills) == 0x4);
static_assert(offsetof(CSession, m_maxLevelEffect4th) == 0x7F6C);
static_assert(offsetof(CSession, m_homunculusAutoFeed) == 0x7F7C);
static_assert(offsetof(CSession, m_options) == 0x7FA8);
static_assert(offsetof(CSession, m_nameToId) == 0x80B4);

View file

@ -222,10 +222,12 @@ public:
bool FindRoute(int startX, int startY, int fractionX, int fractionY, int destX, int destY, int speed);
std::string GetShapeShiftName();
int MountType();
bool IsShapeShifted();
bool ApplyEffectState(int effectId, bool on);
void SetHatEffect(int effectId, bool on);
void SetEffectState(int effectId, bool on);
void SetEffectInstance(int effectId, int instance, bool on);
void ResetJobEffects();
void ClearUnknown037C(int value);
int WeaponActionBase(int weaponType);
int GetUnknown0404();

View file

@ -1345,6 +1345,15 @@ void RenderBounds::Include(const float* box) {
}
}
// OFFSET: 0x00CA9E20
// FUNCTION: fn_21012
bool CGameActor::IsShapeShifted() {
if (g_session.IsCostumeJob(this->GetEffectiveJob(-1)) == true) {
return false;
}
return this->unknown_0404 != 0;
}
// OFFSET: 0x00CAA870
// FUNCTION: fn_21018
bool CGameActor::ApplyEffectState(int effectId, bool on) {
@ -1429,6 +1438,36 @@ void CGameActor::SetEffectInstance(int effectId, int instance, bool on) {
}
}
// OFFSET: 0x00CAAC80
// FUNCTION: fn_21022
void CGameActor::ResetJobEffects() {
this->unknown_02B8 = 0;
this->SendMsg(this, 109, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(this, 109, 0, 976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(this, 109, 0, 977, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(this, 109, 0, 978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(this, 109, 0, 979, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(this, 109, 0, 1022, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(this, 109, 0, 1023, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(this, 109, 0, 1226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(this, 109, 0, 1227, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
this->SendMsg(nullptr, 109, 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
const std::int64_t first = g_session.m_maxLevelEffect4th;
this->SendMsg(this, 109, 0, static_cast<int>(first), static_cast<int>(first >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
const std::int64_t second = g_session.m_maxLevelEffect4thSub;
this->SendMsg(this, 109, 0, static_cast<int>(second), static_cast<int>(second >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
// OFFSET: 0x00CAB020
// FUNCTION: fn_21024
void CGameActor::ClearUnknown037C(int value) {