1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 14:37:44 +00:00

Merge pull request #177 from perize/SQL_REWRITE_OWN

Add a perform handler
This commit is contained in:
Mordred 2017-11-22 08:22:59 +01:00 committed by GitHub
commit 2619e34fe0
5 changed files with 26 additions and 2 deletions

View file

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

View file

@ -1320,6 +1320,12 @@ struct FFXIVIpcActorGauge : FFXIVIpcBasePacket<ActorGauge>
uint8_t data[15]; // depends on classJobId
};
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

@ -598,3 +598,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 >( 0x20 );
memcpy( &performPacket.data().data[0], &inVal, 32 );
pPlayer->sendToInRangeSet( performPacket );
}