1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 22:57:45 +00:00

Add a perform handler

This commit is contained in:
Perize 2017-11-22 00:29:42 +09:00
parent a73e9850e0
commit 9af1ac1b5e
5 changed files with 24 additions and 1 deletions

View file

@ -136,6 +136,7 @@ namespace Packets {
IPCTYPE_UNK_320 = 0x0207, // updated 4.1
IPCTYPE_UNK_322 = 0x0209, // updated 4.1
PerformNote = 0x0252,
};
// TODO: Include structures for the individual packet segment types
@ -198,6 +199,7 @@ namespace Packets {
ReqEquipDisplayFlagsChange = 0x014C, // updated 4.1 ??
PerformNoteHandler = 0x0160,
};
////////////////////////////////////////////////////////////////////////////////

View file

@ -1314,6 +1314,12 @@ struct FFXIVIpcMount : FFXIVIpcBasePacket<Mount>
};
struct FFXIVIpcPerformNote : FFXIVIpcBasePacket<PerformNote>
{
uint8_t data[32];
};
} /* Server */
} /* Packets */
} /* Network */

View file

@ -92,7 +92,9 @@ Core::Network::GameConnection::GameConnection( Core::Network::HivePtr pHive,
setZoneHandler( ClientZoneIpcType::CFRegisterRoulette, "CFRegisterRoulette", &GameConnection::cfRegisterRoulette );
setZoneHandler( ClientZoneIpcType::CFCommenceHandler, "CFDutyAccepted", &GameConnection::cfDutyAccepted);
setZoneHandler( ClientZoneIpcType::ReqEquipDisplayFlagsChange, "ReqEquipDisplayFlagsChange",&GameConnection::reqEquipDisplayFlagsHandler);
setZoneHandler( ClientZoneIpcType::ReqEquipDisplayFlagsChange, "ReqEquipDisplayFlagsChange", &GameConnection::reqEquipDisplayFlagsHandler );
setZoneHandler( ClientZoneIpcType::PerformNoteHandler, "PerformNoteHandler", &GameConnection::performNoteHandler );
setChatHandler( ClientChatIpcType::TellReq, "TellReq", &GameConnection::tellHandler);

View file

@ -118,6 +118,8 @@ public:
DECLARE_HANDLER( reqEquipDisplayFlagsHandler );
DECLARE_HANDLER( performNoteHandler );
DECLARE_HANDLER( tellHandler );
};

View file

@ -596,3 +596,14 @@ void Core::Network::GameConnection::tellHandler( const Packets::GamePacket& inPa
pTargetPlayer->queueChatPacket( tellPacket );
}
void Core::Network::GameConnection::performNoteHandler( const Packets::GamePacket& inPacket,
Entity::PlayerPtr pPlayer )
{
GamePacketNew< FFXIVIpcPerformNote, ServerZoneIpcType > performPacket( pPlayer->getId() );
uint8_t inVal = inPacket.getValAt< uint8_t >( 20 );
memcpy( &performPacket.data().data[0], &inVal, 32 );
pPlayer->sendToInRangeSet( performPacket );
}