mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-06-14 03:17:45 +00:00
Properly sent linkshell member status in linkshell list
This commit is contained in:
parent
1fe1b9ec8b
commit
8ce29c0bdc
4 changed files with 31 additions and 4 deletions
|
@ -22,7 +22,7 @@ namespace Sapphire::Common
|
||||||
const uint64_t INVALID_GAME_OBJECT_ID64 = 0xE0000000;
|
const uint64_t INVALID_GAME_OBJECT_ID64 = 0xE0000000;
|
||||||
|
|
||||||
const uint16_t MAX_PLAYER_LEVEL = 60;
|
const uint16_t MAX_PLAYER_LEVEL = 60;
|
||||||
const uint8_t CURRENT_EXPANSION_ID = 3;
|
const uint8_t CURRENT_EXPANSION_ID = 1;
|
||||||
|
|
||||||
const uint8_t CLASSJOB_TOTAL = 23;
|
const uint8_t CLASSJOB_TOTAL = 23;
|
||||||
const uint8_t CLASSJOB_SLOTS = 23;
|
const uint8_t CLASSJOB_SLOTS = 23;
|
||||||
|
@ -1002,6 +1002,15 @@ namespace Sapphire::Common
|
||||||
MAX_0 = 0x7,
|
MAX_0 = 0x7,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum LinkshellHierarchyShifted : int32_t
|
||||||
|
{
|
||||||
|
None1 = 0x0,
|
||||||
|
Master = 0x900,
|
||||||
|
Leader = 0xa00,
|
||||||
|
Member = 0xb00,
|
||||||
|
Invite = 0xc00,
|
||||||
|
};
|
||||||
|
|
||||||
union HierarchyData
|
union HierarchyData
|
||||||
{
|
{
|
||||||
uint64_t u64;
|
uint64_t u64;
|
||||||
|
|
|
@ -8,6 +8,16 @@
|
||||||
namespace Sapphire::World::Manager
|
namespace Sapphire::World::Manager
|
||||||
{
|
{
|
||||||
|
|
||||||
|
enum Hierarchy : __int32
|
||||||
|
{
|
||||||
|
NONE_1 = 0x0,
|
||||||
|
MASTER = 0x1,
|
||||||
|
LEADER = 0x2,
|
||||||
|
MEMBER = 0x3,
|
||||||
|
INVITE = 0x4,
|
||||||
|
MAX_0 = 0x7,
|
||||||
|
};
|
||||||
|
|
||||||
class LinkshellMgr
|
class LinkshellMgr
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -95,7 +95,7 @@ void Sapphire::Network::GameConnection::getCommonlistHandler( const Packets::FFX
|
||||||
if( !pPlayer )
|
if( !pPlayer )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
PlayerEntry entry;
|
PlayerEntry entry{};
|
||||||
memset( &entry, 0, sizeof( PlayerEntry ) );
|
memset( &entry, 0, sizeof( PlayerEntry ) );
|
||||||
bool isConnected = server.getSession( pPlayer->getCharacterId() ) != nullptr;
|
bool isConnected = server.getSession( pPlayer->getCharacterId() ) != nullptr;
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ void Sapphire::Network::GameConnection::getCommonlistHandler( const Packets::FFX
|
||||||
entry.CharacterID = pPlayer->getCharacterId();
|
entry.CharacterID = pPlayer->getCharacterId();
|
||||||
strcpy( entry.CharacterName, pPlayer->getName().c_str() );
|
strcpy( entry.CharacterName, pPlayer->getName().c_str() );
|
||||||
|
|
||||||
if( hierarchyVec.size() > 0 )
|
if( !hierarchyVec.empty() )
|
||||||
{
|
{
|
||||||
auto hierarchy = hierarchyVec[ i ];
|
auto hierarchy = hierarchyVec[ i ];
|
||||||
|
|
||||||
|
|
|
@ -181,10 +181,18 @@ void Sapphire::Network::GameConnection::linkshellListHandler( const Packets::FFX
|
||||||
for( int i = 0; i < lsVec.size(); ++i )
|
for( int i = 0; i < lsVec.size(); ++i )
|
||||||
{
|
{
|
||||||
auto pLs = lsVec[ i ];
|
auto pLs = lsVec[ i ];
|
||||||
|
uint32_t hierarchy = 0;
|
||||||
|
|
||||||
|
if( pLs->getMasterId() == player.getCharacterId() )
|
||||||
|
hierarchy = LinkshellHierarchyShifted::Master;
|
||||||
|
else if( pLs->getLeaderIdList().count( player.getCharacterId() ) )
|
||||||
|
hierarchy = LinkshellHierarchyShifted::Leader;
|
||||||
|
else
|
||||||
|
hierarchy = 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();
|
||||||
linkshellListPacket->data().LinkshellList[ i ].HierarchyID = player.getId(); // unknown - possibly FC related
|
linkshellListPacket->data().LinkshellList[ i ].HierarchyID = hierarchy;
|
||||||
strcpy( linkshellListPacket->data().LinkshellList[ i ].LinkshellName, pLs->getName().c_str() );
|
strcpy( linkshellListPacket->data().LinkshellList[ i ].LinkshellName, pLs->getName().c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue