diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index e032ff86..eb44f638 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -488,3 +488,31 @@ bool CSession::IsFriendName(const char* name) const { int CSession::GetSceneUnknown004C() const { return static_cast(g_modeMgr.GetGameMode())->scene->unknown_004C; } + +// OFFSET: 0x00DDB4D0 + +// OFFSET: 0x00DDC050 + +// OFFSET: 0x00DDC0A0 + +// OFFSET: 0x00DDC0F0 + +// OFFSET: 0x00DDC330 + +// OFFSET: 0x00DDC580 + +// OFFSET: 0x00DDC7A0 + +// OFFSET: 0x00DDC830 + +// OFFSET: 0x00DDC9D0 + +// OFFSET: 0x00DDD300 + +// OFFSET: 0x00DDD400 + +// OFFSET: 0x00DDD710 + +// OFFSET: 0x00DDD7B0 + +// OFFSET: 0x00DDD9A0 diff --git a/Source/Client/Session.h b/Source/Client/Session.h index e4ef1129..b906c351 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -76,7 +76,10 @@ public: /* 06A8 */ unsigned char unknown_06A8[0x43]; /* 06EB */ NormalItemSlot unknown_06EB; /* 06F2 */ NormalItemSlot unknown_06F2; - /* 06F9 */ unsigned char unknown_06F9[0x23]; + /* 06F9 */ unsigned char unknown_06F9[0x07]; + /* 0700 */ std::map unknown_0700; + /* 0708 */ std::map unknown_0708; + /* 0710 */ unsigned char unknown_0710[0x0C]; /* 071C */ std::vector m_homunSkillLevels; /* 0728 */ std::vector m_mercSkillLevels; /* 0734 */ std::list unknown_0734; @@ -103,7 +106,8 @@ public: /* 0EF0 */ int m_headPalette; /* 0EF4 */ unsigned char unknown_0EF4[0x0C]; /* 0F00 */ int m_robe; - /* 0F04 */ unsigned char unknown_0F04[0x10]; + /* 0F04 */ bool m_newRobeDrawOnTop; + /* 0F05 */ unsigned char unknown_0F05[0x0F]; /* 0F14 */ std::uint32_t m_jobFlags; /* 0F18 */ int m_playerX; /* 0F1C */ int m_playerY; @@ -119,7 +123,9 @@ public: /* 0F6C */ const char* const* m_humanMaleHeadNames; /* 0F70 */ unsigned char unknown_0F70[0x08]; /* 0F78 */ const char* const* m_humanFemaleHeadNames; - /* 0F7C */ unsigned char unknown_0F7C[0x2C]; + /* 0F7C */ unsigned char unknown_0F7C[0x08]; + /* 0F84 */ const char* const* m_imfNames; + /* 0F88 */ unsigned char unknown_0F88[0x20]; /* 0FA8 */ std::vector m_jobNameTable; /* 0FB4 */ std::map m_jobNameTableWoman; /* 0FBC */ std::map m_jobNameTableMan; @@ -172,7 +178,8 @@ public: /* 4860 */ ITEM_INFO m_itemSlots[10]; /* 5210 */ unsigned char unknown_5210[0x14]; /* 5224 */ std::vector> m_bgmFileNames; - /* 5230 */ unsigned char unknown_5230[0x24]; + /* 5230 */ std::vector>> m_fogParameters; + /* 523C */ unsigned char unknown_523C[0x18]; /* 5254 */ std::map m_npcLocationRadius; /* 525C */ unsigned char unknown_525C[0x38]; /* 5294 */ const char* const* m_bodyJobNames; @@ -470,6 +477,24 @@ public: int GetItemDescription40(int id); std::uint32_t GetUnknown0420(int index); void GetSkillActionInfo(int skillId, int& effectId, int& motion, int variant, int level); + bool IsNumberWithCommas(char* text); + bool IsRobeDrawOnTop(int action, int frame, bool riding); + int GetUnknown8134() const; + int FindUnknown0708(int key) const; + int FindUnknown0700(int key) const; + const char* GetEnemyHitWaveName(int element); + ITEM_INFO* GetEquippedItem(const ITEM_INFO* item); + ITEM_INFO FindItem2B50(std::uint32_t id, int* index) const; + ITEM_INFO FindItem17F0(std::uint32_t id, int* index) const; + ITEM_INFO GetExchangeItem(int index) const; + const std::vector* GetFogParameters(const char* rswName, int* found); + std::string GetPlayerHeadSprName(); + std::string GetImfName(int job); + std::uint16_t FindInventoryIndexByItemId(int itemId); + std::vector FindInventoryIndicesByItemId(int itemId, unsigned char identifiedOnly); + ITEM_INFO GetInventoryItemAt(int index) const; + ITEM_INFO* FindInventoryItemByItemId(int itemId, bool identifiedOnly); + int GetInventoryItemCount(int itemId) const; }; extern CSession g_session; @@ -574,6 +599,11 @@ static_assert(offsetof(CSession, m_maxLevel) == 0x7EEC); static_assert(offsetof(CSession, m_cardItems) == 0x811C); static_assert(offsetof(CSession, m_startTimeTicks) == 0x8138); static_assert(offsetof(CSession, m_loginTimeTicks) == 0x8140); +static_assert(offsetof(CSession, unknown_0700) == 0x700); +static_assert(offsetof(CSession, unknown_0708) == 0x708); +static_assert(offsetof(CSession, m_newRobeDrawOnTop) == 0xF04); +static_assert(offsetof(CSession, m_imfNames) == 0xF84); +static_assert(offsetof(CSession, m_fogParameters) == 0x5230); #endif #endif diff --git a/Source/Contents/ClientItemLists.cpp b/Source/Contents/ClientItemLists.cpp index 2ef1ad6e..047fb150 100644 --- a/Source/Contents/ClientItemLists.cpp +++ b/Source/Contents/ClientItemLists.cpp @@ -53,6 +53,20 @@ struct ClientItemLists { void MergeItem1718(const ITEM_INFO& item); bool AddItem1738(const ITEM_INFO& item, unsigned char refresh); EquipSlots GetEquipSlots(int location); + void RemoveItem1758ByItemId(ITEM_INFO& item); + void RemoveItem1710(std::uint32_t id, int quantity); + bool RemoveItem1768(const ITEM_INFO& item, unsigned char alternate); + bool RemoveItem1740(const ITEM_INFO& item); + bool RemoveItem1750(const ITEM_INFO& item, int type, unsigned char refresh); + void RemoveItem1758(ITEM_INFO& item); + void RemoveItem1760(const ITEM_INFO& item); + void RemoveItem1718ByItemId(const ITEM_INFO& item); + void RemoveItem1718(const ITEM_INFO& item); + void RemoveItem1720ByName(const ITEM_INFO& item); + void RemoveItem1720(const ITEM_INFO& item); + void RemoveItem1730(const ITEM_INFO& item); + void ReduceItem1718(const ITEM_INFO& item); + bool RemoveItem1738(const ITEM_INFO& item); }; #if defined(_WIN32) && !defined(_WIN64) @@ -469,3 +483,31 @@ EquipSlots ClientItemLists::GetEquipSlots(int location) { const EquipSlots slots = EquipSlotDecoder().Decode(mask); return slots; } + +// OFFSET: 0x00DDA470 + +// OFFSET: 0x00DDA510 + +// OFFSET: 0x00DDA5A0 + +// OFFSET: 0x00DDA690 + +// OFFSET: 0x00DDA740 + +// OFFSET: 0x00DDA8B0 + +// OFFSET: 0x00DDA920 + +// OFFSET: 0x00DDA9C0 + +// OFFSET: 0x00DDAA50 + +// OFFSET: 0x00DDAAB0 + +// OFFSET: 0x00DDAB30 + +// OFFSET: 0x00DDAC40 + +// OFFSET: 0x00DDAC90 + +// OFFSET: 0x00DDACE0 diff --git a/Source/Contents/ClientTiming.cpp b/Source/Contents/ClientTiming.cpp index 79d4427e..56a1cb1e 100644 --- a/Source/Contents/ClientTiming.cpp +++ b/Source/Contents/ClientTiming.cpp @@ -624,6 +624,12 @@ int CSession::SetUnknown8134(int value) { return value; } +// OFFSET: 0x00DDBB50 +// FUNCTION: fn_23359 +int CSession::GetUnknown8134() const { + return this->unknown_8134; +} + // OFFSET: 0x00E01670 // FUNCTION: fn_23647 void CSession::ClearUnknown1710(int id) { diff --git a/Source/Contents/HeadResources.cpp b/Source/Contents/HeadResources.cpp index b6e66774..2a8a9a45 100644 --- a/Source/Contents/HeadResources.cpp +++ b/Source/Contents/HeadResources.cpp @@ -158,6 +158,8 @@ std::string CSession::GetSexName(int sex) { return this->m_sexNames[sex]; } +// OFFSET: 0x00DDD100 + // OFFSET: 0x00BAB110 // FUNCTION: fn_19751 std::string EquipmentResourceMgr::GetHeadName(int type, int job, int sex, int* head) { @@ -298,3 +300,5 @@ std::string CSession::GetPlayerHeadPalName() { std::string CSession::GetHeadSprName(int job, int sex, int* head) { return g_equipmentResourceMgr->GetHeadName(1, job, sex, head); } + +// OFFSET: 0x00DDD050 diff --git a/Source/Contents/RobeTopLayer.cpp b/Source/Contents/RobeTopLayer.cpp index 20f4d407..228c1fbb 100644 --- a/Source/Contents/RobeTopLayer.cpp +++ b/Source/Contents/RobeTopLayer.cpp @@ -12,3 +12,5 @@ bool CSession::IsTopLayerRobe(int robe) { g_session.m_hotkeyScript->Call("IsTopLayer", "d>b", robe, &isTopLayer); return isTopLayer; } + +// OFFSET: 0x00DDB920