1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57: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, MAX_0 = 0x7,
}; };
enum LinkshellHierarchyShifted : int32_t namespace Ls
{ {
None1 = 0x0, enum LinkshellHierarchyShifted : int32_t
Master = 0x900, {
Leader = 0xa00, None1 = 0x0,
Member = 0xb00, Master = 0x900,
Invite = 0xc00, Leader = 0xa00,
}; Member = 0xb00,
Invite = 0xc00,
};
}
union HierarchyData union HierarchyData
{ {

View file

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

View file

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