Decompile 2 functions in Source/Contents/ClientState.cpp, Source/Contents/ClientState.h, ...
Batch #1835 by Yommy: 0 byte-identical, 2 confirmed by peer review. - fn_24222 CSession::SetHomunculusAutoFeed: logic confirmed by peer review - fn_24223 CSession::SetPetAutoFeed: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
75bc9ea504
commit
f05827650a
3 changed files with 40 additions and 1 deletions
|
|
@ -178,7 +178,9 @@ public:
|
||||||
/* 6198 */ const char* const* m_doramFemaleHeadNames;
|
/* 6198 */ const char* const* m_doramFemaleHeadNames;
|
||||||
/* 619C */ unsigned char unknown_619C[0x1D44];
|
/* 619C */ unsigned char unknown_619C[0x1D44];
|
||||||
/* 7EE0 */ std::map<int, RobeAlpha> m_robeAlpha;
|
/* 7EE0 */ std::map<int, RobeAlpha> m_robeAlpha;
|
||||||
/* 7EE8 */ unsigned char unknown_7EE8[0xC0];
|
/* 7EE8 */ unsigned char unknown_7EE8[0x94];
|
||||||
|
/* 7F7C */ bool m_homunculusAutoFeed;
|
||||||
|
/* 7F7D */ unsigned char unknown_7F7D[0x2B];
|
||||||
/* 7FA8 */ CInstantVar m_options;
|
/* 7FA8 */ CInstantVar m_options;
|
||||||
/* 7FB4 */ unsigned char unknown_7FB4[0xC0];
|
/* 7FB4 */ unsigned char unknown_7FB4[0xC0];
|
||||||
/* 8074 */ int unknown_8074;
|
/* 8074 */ int unknown_8074;
|
||||||
|
|
@ -271,6 +273,8 @@ public:
|
||||||
void LoadXmlTables();
|
void LoadXmlTables();
|
||||||
std::string GetAccessoryName(int id);
|
std::string GetAccessoryName(int id);
|
||||||
void CollectCardItems();
|
void CollectCardItems();
|
||||||
|
void SetHomunculusAutoFeed(bool enabled);
|
||||||
|
void SetPetAutoFeed(bool enabled);
|
||||||
int GetRobeAlpha(int robeId);
|
int GetRobeAlpha(int robeId);
|
||||||
bool IsTopLayerRobe(int robe);
|
bool IsTopLayerRobe(int robe);
|
||||||
int IsSkillIdInRange6018(unsigned id) const;
|
int IsSkillIdInRange6018(unsigned id) const;
|
||||||
|
|
@ -303,6 +307,7 @@ static_assert(offsetof(CSession, m_prohibitionLog) == 0x754);
|
||||||
static_assert(offsetof(SessionRecord6144, unknown_002C) == 0x2C);
|
static_assert(offsetof(SessionRecord6144, unknown_002C) == 0x2C);
|
||||||
static_assert(offsetof(SessionRecord6144, unknown_0030) == 0x30);
|
static_assert(offsetof(SessionRecord6144, unknown_0030) == 0x30);
|
||||||
static_assert(offsetof(CSession, m_additionalSkills) == 0x4);
|
static_assert(offsetof(CSession, m_additionalSkills) == 0x4);
|
||||||
|
static_assert(offsetof(CSession, m_homunculusAutoFeed) == 0x7F7C);
|
||||||
static_assert(offsetof(CSession, m_options) == 0x7FA8);
|
static_assert(offsetof(CSession, m_options) == 0x7FA8);
|
||||||
static_assert(offsetof(CSession, m_nameToId) == 0x80B4);
|
static_assert(offsetof(CSession, m_nameToId) == 0x80B4);
|
||||||
static_assert(offsetof(CSession, m_level) == 0x1650);
|
static_assert(offsetof(CSession, m_level) == 0x1650);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,40 @@
|
||||||
#include "Contents/ClientState.h"
|
#include "Contents/ClientState.h"
|
||||||
|
|
||||||
#include "Client/Session.h"
|
#include "Client/Session.h"
|
||||||
|
#include "Contents/MessageTable.h"
|
||||||
#include "UI/Window/UIWindow.h"
|
#include "UI/Window/UIWindow.h"
|
||||||
#include "UI/Window/UIWindowMgr.h"
|
#include "UI/Window/UIWindowMgr.h"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
// GLOBAL: gl_24492
|
||||||
|
bool g_homunculusAutoFeed;
|
||||||
|
|
||||||
|
// GLOBAL: gl_24493
|
||||||
|
bool g_petAutoFeed;
|
||||||
|
|
||||||
|
// OFFSET: 0x00E48930
|
||||||
|
// FUNCTION: fn_24222
|
||||||
|
void CSession::SetHomunculusAutoFeed(bool enabled) {
|
||||||
|
int message;
|
||||||
|
if (enabled == true) {
|
||||||
|
this->m_homunculusAutoFeed = true;
|
||||||
|
message = 3282;
|
||||||
|
} else {
|
||||||
|
g_homunculusAutoFeed = false;
|
||||||
|
message = 3283;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(message)), 0x64FFFF, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x00E48980
|
||||||
|
// FUNCTION: fn_24223
|
||||||
|
void CSession::SetPetAutoFeed(bool enabled) {
|
||||||
|
g_petAutoFeed = enabled == true;
|
||||||
|
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(enabled ? 2579 : 2580)), 0x64FFFF, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: 0x00E48B00
|
// OFFSET: 0x00E48B00
|
||||||
// FUNCTION: fn_24225
|
// FUNCTION: fn_24225
|
||||||
void CSession::CollectCardItems() {
|
void CSession::CollectCardItems() {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef RAGNAROK_SOURCE_CONTENTS_CLIENTSTATE_H
|
#ifndef RAGNAROK_SOURCE_CONTENTS_CLIENTSTATE_H
|
||||||
#define RAGNAROK_SOURCE_CONTENTS_CLIENTSTATE_H
|
#define RAGNAROK_SOURCE_CONTENTS_CLIENTSTATE_H
|
||||||
|
|
||||||
|
extern bool g_homunculusAutoFeed;
|
||||||
|
extern bool g_petAutoFeed;
|
||||||
|
|
||||||
void RequestBasicInfoRefresh();
|
void RequestBasicInfoRefresh();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue