diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index 0f5b9e3..957f7bf 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -30,6 +30,12 @@ int CSession::SyncUnknown0E98() { return this->unknown_0E98; } +// OFFSET: 0x00DF9B90 +// FUNCTION: fn_23562 +int CSession::IsExchangeItemListFull() { + return this->GetFilledExchangeItemList() == 10; +} + // OFFSET: 0x00DFFCF0 // FUNCTION: fn_23633 void CSession::ClearItemSelection() { diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 1a1c074..b96c4ea 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -133,7 +133,7 @@ public: /* 21A0 */ unsigned char unknown_21A0[0x9B0]; /* 2B50 */ ItemInfo unknown_2B50[10]; /* 3500 */ ItemInfo unknown_3500[10]; - /* 3EB0 */ unsigned char unknown_3EB0[0x9B0]; + /* 3EB0 */ ItemInfo m_exchangeItems[10]; /* 4860 */ ItemInfo m_itemSlots[10]; /* 5210 */ unsigned char unknown_5210[0x44]; /* 5254 */ std::map m_npcLocationRadius; @@ -288,6 +288,19 @@ public: void SetPetAutoFeed(bool enabled); int GetRobeAlpha(int robeId); bool IsTopLayerRobe(int robe); + int IsExchangeItemListFull(); + // INLINED + int GetFilledExchangeItemList() { + int count = 0; + + for (int i = 0; i < 10; ++i) { + if (this->m_exchangeItems[i].quantity) { + ++count; + } + } + + return count; + } int IsSkillIdInRange6018(unsigned id) const; int IsSkillIdInRange6001(unsigned id) const; const ActionFrame* GetSyncedFrame(CActRes* baseAct, CActRes* act, unsigned action, int baseFrame, std::uint32_t startTime, int* frame);