diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index f17317fd..b199197b 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -1244,6 +1244,19 @@ bool CSession::IsGuildMemberName(const char* name) const { return std::strcmp(g_guildName.c_str(), name) == 0; } +// OFFSET: 0x00DFA160 +// FUNCTION: fn_23571 +bool CSession::IsUnknownName5248(const char* name) const { + std::string value(name); + const std::size_t position = value.rfind("@"); + if (position != std::string::npos && position >= 4) { + value.erase(position - 4, 3); + } + + return std::binary_search(this->unknown_5248.begin(), this->unknown_5248.end(), value.c_str(), + [](const char* left, const char* right) { return std::strcmp(left, right) < 0; }); +} + // OFFSET: 0x00DDB580 // FUNCTION: fn_23354 void CSession::RemovePartyMemberByName(const char* name) { diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 927fb78b..ca31b8df 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -250,7 +250,8 @@ public: /* 5218 */ std::vector> m_commandIds; /* 5224 */ std::vector> m_bgmFileNames; /* 5230 */ std::vector>> m_fogParameters; - /* 523C */ unsigned char unknown_523C[0x18]; + /* 523C */ unsigned char unknown_523C[0x0C]; + /* 5248 */ std::vector unknown_5248; /* 5254 */ std::map m_npcLocationRadius; /* 525C */ unsigned char unknown_525C[0x38]; /* 5294 */ const char* const* m_bodyJobNames; @@ -605,6 +606,7 @@ public: bool IsGuildMemberCharacter(std::uint32_t characterId) const; bool IsGuildMemberCharacter(int characterId, char* name) const; bool IsGuildMemberName(const char* name) const; + bool IsUnknownName5248(const char* name) const; long long GetItem1760Total() const; ITEM_INFO GetItem1748At(int index) const; bool HasItem1718(std::uint32_t id) const;