diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 90d7090..882c98e 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -73,7 +73,9 @@ public: /* 6144 */ std::map unknown_6144; /* 614C */ unsigned char unknown_614C[0x20]; /* 616C */ std::vector unknown_616C; - /* 6178 */ unsigned char unknown_6178[0x1FC0]; + /* 6178 */ unsigned char unknown_6178[0x1FA4]; + /* 811C */ std::vector m_cardItems; + /* 8128 */ unsigned char unknown_8128[0x10]; /* 8138 */ std::int64_t m_startTimeTicks; /* 8140 */ std::int64_t m_loginTimeTicks; /* 8148 */ int unknown_8148; @@ -118,6 +120,7 @@ public: char* ConvertTooltipText(const char* source, char* output) const; int MercSkillLevel(int skillId) const; int SyncUnknown0E98(); + void CollectCardItems(); }; extern CSession g_session; @@ -157,6 +160,7 @@ static_assert(offsetof(CSession, unknown_5C68) == 0x5C68); static_assert(offsetof(CSession, unknown_6140) == 0x6140); static_assert(offsetof(CSession, unknown_6144) == 0x6144); static_assert(offsetof(CSession, unknown_616C) == 0x616C); +static_assert(offsetof(CSession, m_cardItems) == 0x811C); static_assert(offsetof(CSession, m_startTimeTicks) == 0x8138); static_assert(offsetof(CSession, m_loginTimeTicks) == 0x8140); #endif diff --git a/Source/Contents/ClientState.cpp b/Source/Contents/ClientState.cpp new file mode 100644 index 0000000..1b1a134 --- /dev/null +++ b/Source/Contents/ClientState.cpp @@ -0,0 +1,18 @@ +#include "Contents/ClientState.h" + +#include "Client/Session.h" +#include "UI/Window/UIWindow.h" +#include "UI/Window/UIWindowMgr.h" + +// OFFSET: 0x00E48B00 +// FUNCTION: fn_24225 +void CSession::CollectCardItems() { + this->m_cardItems.clear(); + for (const ItemInfo& item : this->m_inventoryItems) { + if (item.unknown_0000[0] == 6) { + this->m_cardItems.push_back(item); + } + } +} + +// OFFSET: 0x00E48B70 diff --git a/Source/Contents/ClientState.h b/Source/Contents/ClientState.h new file mode 100644 index 0000000..e915454 --- /dev/null +++ b/Source/Contents/ClientState.h @@ -0,0 +1,6 @@ +#ifndef RAGNAROK_SOURCE_CONTENTS_CLIENTSTATE_H +#define RAGNAROK_SOURCE_CONTENTS_CLIENTSTATE_H + +void RequestBasicInfoRefresh(); + +#endif diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index a5d6787..56f8242 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -152,7 +152,7 @@ public: /* 01D4 */ std::uint32_t unknown_01D4; /* 01D8 */ std::uint32_t unknown_01D8; /* 01DC */ std::uint32_t unknown_01DC; - /* 01E0 */ std::uint32_t unknown_01E0; + /* 01E0 */ UIWindow* unknown_01E0; /* 01E4 */ std::uint32_t unknown_01E4; /* 01E8 */ UIWindow* window_01E8; /* 01EC */ UIWindow* window_01EC; diff --git a/data/compile.json b/data/compile.json index 099a863..a7b018f 100644 --- a/data/compile.json +++ b/data/compile.json @@ -283,6 +283,7 @@ "Source/Contents/Camera/CameraSmoothing.cpp": 3, "Source/Contents/CashEmotionMgr.cpp": 4, "Source/Contents/ClientItemLists.cpp": 4, + "Source/Contents/ClientState.cpp": 4, "Source/Contents/Configuration/OptionWriter.cpp": 4, "Source/Contents/Configuration/ScriptOptions.cpp": 4, "Source/Contents/Configuration/ServiceConfiguration.cpp": 4,