mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
cleanup clienttrigger ipc struct, verbose packet construction log switch
This commit is contained in:
parent
44eeda832b
commit
c18ea5e734
3 changed files with 20 additions and 6 deletions
|
@ -184,7 +184,7 @@ public:
|
|||
initialize();
|
||||
};
|
||||
|
||||
FFXIVIpcPacket< T, T1 >( const FFXIVARR_PACKET_RAW& rawPacket )
|
||||
FFXIVIpcPacket< T, T1 >( const FFXIVARR_PACKET_RAW& rawPacket, bool verbose = false )
|
||||
{
|
||||
auto ipcHdrSize = sizeof( FFXIVARR_IPC_HEADER );
|
||||
auto copySize = std::min< uint32_t >( sizeof( T ), rawPacket.segHdr.size - ipcHdrSize );
|
||||
|
@ -193,7 +193,7 @@ public:
|
|||
memcpy( &m_data, &rawPacket.data[0] + ipcHdrSize, copySize );
|
||||
|
||||
auto log = g_fw.get< Core::Logger >();
|
||||
if( log )
|
||||
if( log && verbose )
|
||||
{
|
||||
log->debug( "rawpacket size " + std::to_string( rawPacket.segHdr.size ) + "\n" + Util::binaryToHexDump( const_cast< uint8_t* >( &rawPacket.data[0] ), rawPacket.segHdr.size ) );
|
||||
log->debug( "T size " + std::to_string( sizeof( T ) ) + "\n" + Util::binaryToHexDump( reinterpret_cast< uint8_t* >( &m_data ), sizeof( T ) ) );
|
||||
|
|
|
@ -25,16 +25,30 @@ struct FFXIVIpcGmCommand2 : FFXIVIpcBasePacket< GMCommand2 >
|
|||
/* 0014 */ char param1[0x20];
|
||||
};
|
||||
|
||||
#pragma pack(push, 4)
|
||||
|
||||
struct FFXIVIpcClientTrigger : FFXIVIpcBasePacket< ClientTrigger >
|
||||
{
|
||||
/* 0000 */ uint16_t commandId;
|
||||
/* 0002 */ char unk_2[2];
|
||||
/* 0002 */ uint8_t unk_2[2];
|
||||
|
||||
union
|
||||
{
|
||||
/* 0004 */ uint64_t param1;
|
||||
struct
|
||||
{
|
||||
/* 0004 */ uint32_t param11;
|
||||
/* 0008 */ uint32_t param12;
|
||||
};
|
||||
};
|
||||
|
||||
/* 000C */ uint32_t param2;
|
||||
/* 0010 */ char unk_10[8];
|
||||
/* 0018 */ uint64_t param3;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
struct FFXIVIpcSkillHandler : FFXIVIpcBasePacket< SkillHandler >
|
||||
{
|
||||
/* 0000 */ char pad_0000[1];
|
||||
|
|
|
@ -49,8 +49,8 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
|
|||
|
||||
const auto& commandId = packet.data().commandId;
|
||||
const auto& param1 = packet.data().param1;
|
||||
const auto& param11 = *reinterpret_cast< const uint32_t* >( &packet.data().param1 );
|
||||
const auto& param12 = *reinterpret_cast< const uint32_t* >( &packet.data().param1 + sizeof( uint32_t ) );
|
||||
const auto& param11 = packet.data().param11;
|
||||
const auto& param12 = packet.data().param12;
|
||||
const auto& param2 = packet.data().param2;
|
||||
const auto& param3 = packet.data().param3;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue