1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-24 18:47:45 +00:00

Enum List Type

This commit is contained in:
Maru 2017-12-06 02:46:22 -02:00
parent 1332d580df
commit a8be93b5fd
2 changed files with 13 additions and 7 deletions

View file

@ -802,8 +802,6 @@ namespace Core {
Normal = 0x1,
MountSkill = 0xD,
};
/*! ModelType as found in eventsystemdefine.exd */
enum SocialCategory : uint8_t
{
@ -813,6 +811,14 @@ namespace Core {
FreeCompany = 5,
};
enum SocialListType : uint8_t
{
PartyList = 0x02,
FriendList = 0x0b,
SearchList = 0x0e,
};
// todo: rename SocialRequestAction and SocialRequestResponse cause they seem ambiguous
enum class SocialRequestAction : uint8_t
{

View file

@ -433,7 +433,7 @@ void Core::Network::GameConnection::socialListHandler( const Packets::GamePacket
uint8_t type = inPacket.getValAt< uint8_t >( 0x2A );
uint8_t count = inPacket.getValAt< uint8_t >( 0x2B );
if( type == 0x02 )
if( type == SocialListType::PartyList )
{ // party list
ZoneChannelPacket< FFXIVIpcSocialList > listPacket( pPlayer->getId() );;
@ -449,7 +449,7 @@ void Core::Network::GameConnection::socialListHandler( const Packets::GamePacket
queueOutPacket( listPacket );
}
else if( type == 0x0b )
else if( type == SocialListType::FriendList )
{ // friend list
ZoneChannelPacket< FFXIVIpcSocialList > listPacket( pPlayer->getId() );
@ -466,8 +466,8 @@ void Core::Network::GameConnection::socialListHandler( const Packets::GamePacket
auto pFriend = actor->getAsPlayer();
if( pFriend )
{
listPacket.data().entries[i] = pFriend->generatePlayerEntry();
i++;
/*listPacket.data().entries[i] = pFriend->generatePlayerEntry();
i++;*/
}
// todo: remove this branch entirely when using manager. physically hurts
@ -481,7 +481,7 @@ void Core::Network::GameConnection::socialListHandler( const Packets::GamePacket
queueOutPacket( listPacket );
}
else if( type == 0x0e )
else if( type == SocialListType::SearchList )
{ // player search result
// TODO: implement player search
}