diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index ca31fb6f4..a38094771 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -648,14 +648,14 @@ bool CSession::HasItem17D4(int itemId) const { // OFFSET: 0x00DF9D30 // FUNCTION: fn_23566 -bool CSession::IsFriendName(const char* name) const { +int CSession::IsFriendName(const char* name) const { for (const MessengerMember& member : this->m_friends) { if (member.name == name) { - return true; + return 1; } } - return false; + return 0; } // OFFSET: 0x00E1DFB0 diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 45d928985..550268aee 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -836,7 +836,7 @@ public: const char* GetPlayerMapDisplayName(); std::uint32_t GetPartyMemberAid(const char* name); bool HasItem17D4(int itemId) const; - bool IsFriendName(const char* name) const; + int IsFriendName(const char* name) const; bool RemoveFriendByCharacterId(std::uint32_t characterId); void RemovePartyMemberByName(const char* name); bool IsGuildMemberAccount(std::uint32_t accountId) const; diff --git a/Source/UI/Window/FrameFocus.cpp b/Source/UI/Window/FrameFocus.cpp index c89814455..eb95e581e 100644 --- a/Source/UI/Window/FrameFocus.cpp +++ b/Source/UI/Window/FrameFocus.cpp @@ -114,7 +114,7 @@ bool UIWindowMgr::IsHoverParentVisible() { // OFFSET: 0x00A96E90 // FUNCTION: fn_17195 -bool UIWindowMgr::IsFriend(const char* name) { +int UIWindowMgr::IsFriend(const char* name) { return g_session.IsFriendName(name) != 0; } diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index 8703ca69a..c569a63c9 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -573,7 +573,7 @@ public: bool IsDropDownChild(const UIWindow* window); bool HasMiniPartyMember(std::uint32_t accountId); bool IsHoverParentVisible(); - bool IsFriend(const char* name); + int IsFriend(const char* name); bool IsSharedWindowId(int id); bool HasNavigationBlocker(); bool Window4F250Ready();