1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 14:37:44 +00:00

Allow invite to show, invite packets and linkshell updating not included

This commit is contained in:
Mordred 2021-12-04 01:27:35 +01:00
parent 8ce29c0bdc
commit ee0cdfad0b
3 changed files with 17 additions and 11 deletions

View file

@ -1002,14 +1002,17 @@ namespace Sapphire::Common
MAX_0 = 0x7,
};
enum LinkshellHierarchyShifted : int32_t
namespace Ls
{
None1 = 0x0,
Master = 0x900,
Leader = 0xa00,
Member = 0xb00,
Invite = 0xc00,
};
enum LinkshellHierarchyShifted : int32_t
{
None1 = 0x0,
Master = 0x900,
Leader = 0xa00,
Member = 0xb00,
Invite = 0xc00,
};
}
union HierarchyData
{

View file

@ -193,9 +193,10 @@ const std::vector< Sapphire::LinkshellPtr > Sapphire::World::Manager::LinkshellM
for( const auto &[ key, value ] : m_linkshellIdMap )
{
auto& memberList = value->getMemberIdList();
auto& inviteList = value->getInviteIdList();
// find player id in LS member list
if( !( memberList.find( player.getCharacterId() ) == memberList.end() ) )
if( memberList.count( player.getCharacterId() ) || inviteList.count( player.getCharacterId() ) )
{
lsVec.emplace_back( value );
}

View file

@ -184,11 +184,13 @@ void Sapphire::Network::GameConnection::linkshellListHandler( const Packets::FFX
uint32_t hierarchy = 0;
if( pLs->getMasterId() == player.getCharacterId() )
hierarchy = LinkshellHierarchyShifted::Master;
hierarchy = Ls::LinkshellHierarchyShifted::Master;
else if( pLs->getLeaderIdList().count( player.getCharacterId() ) )
hierarchy = LinkshellHierarchyShifted::Leader;
hierarchy = Ls::LinkshellHierarchyShifted::Leader;
else if( pLs->getInviteIdList().count( player.getCharacterId() ) )
hierarchy = Ls::LinkshellHierarchyShifted::Invite;
else
hierarchy = LinkshellHierarchyShifted::Member;
hierarchy = Ls::LinkshellHierarchyShifted::Member;
linkshellListPacket->data().LinkshellList[ i ].LinkshellID = pLs->getId();
linkshellListPacket->data().LinkshellList[ i ].ChannelID = pLs->getChatChannel();