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:
parent
8ce29c0bdc
commit
ee0cdfad0b
3 changed files with 17 additions and 11 deletions
|
@ -1002,6 +1002,8 @@ namespace Sapphire::Common
|
||||||
MAX_0 = 0x7,
|
MAX_0 = 0x7,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace Ls
|
||||||
|
{
|
||||||
enum LinkshellHierarchyShifted : int32_t
|
enum LinkshellHierarchyShifted : int32_t
|
||||||
{
|
{
|
||||||
None1 = 0x0,
|
None1 = 0x0,
|
||||||
|
@ -1010,6 +1012,7 @@ namespace Sapphire::Common
|
||||||
Member = 0xb00,
|
Member = 0xb00,
|
||||||
Invite = 0xc00,
|
Invite = 0xc00,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
union HierarchyData
|
union HierarchyData
|
||||||
{
|
{
|
||||||
|
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Add table
Reference in a new issue