diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 79691bdb..d3e657b9 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -260,7 +260,10 @@ public: /* 7EE0 */ std::map 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); diff --git a/Source/Contents/Actors/GameActor.h b/Source/Contents/Actors/GameActor.h index 5cecccc1..7d4fe8b2 100644 --- a/Source/Contents/Actors/GameActor.h +++ b/Source/Contents/Actors/GameActor.h @@ -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(); diff --git a/Source/Contents/Actors/RenderObject.cpp b/Source/Contents/Actors/RenderObject.cpp index a9c42cd1..13862989 100644 --- a/Source/Contents/Actors/RenderObject.cpp +++ b/Source/Contents/Actors/RenderObject.cpp @@ -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(first), static_cast(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(second), static_cast(second >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +} + // OFFSET: 0x00CAB020 // FUNCTION: fn_21024 void CGameActor::ClearUnknown037C(int value) {