1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-04 09:47:46 +00:00

Fix a perform handler

This commit is contained in:
Perize 2017-12-09 13:09:56 +09:00
parent 5913be0a31
commit 7998448574
2 changed files with 14 additions and 8 deletions

View file

@ -67,9 +67,15 @@ public:
memcpy( reinterpret_cast< uint8_t* >( &m_dataBuf[0] + pos ), str.c_str(), str.length() );
}
uint8_t * getData()
const uint8_t * getData() const
{
return reinterpret_cast< uint8_t* >( &m_dataBuf[0] );
return reinterpret_cast< const uint8_t* >( &m_dataBuf[0] );
}
const uint8_t * getDataAt(uint16_t pos) const
{
assert(m_segHdr.size > pos);
return reinterpret_cast< const uint8_t* >(&m_dataBuf[0] + pos);
}
void setHeader( uint16_t size, uint16_t type, uint32_t id1, uint32_t id2, uint16_t subType, uint32_t unknown = 0xFED2E000 );

View file

@ -603,8 +603,8 @@ void Core::Network::GameConnection::performNoteHandler( const Packets::GamePacke
{
GamePacketNew< FFXIVIpcPerformNote, ServerZoneIpcType > performPacket( player.getId() );
uint8_t inVal = inPacket.getValAt< uint8_t >( 0x20 );
memcpy( &performPacket.data().data[0], &inVal, 32 );
auto inVal = inPacket.getDataAt(0x20);
memcpy( &performPacket.data().data[0], inVal, 32 );
player.sendToInRangeSet( performPacket );
}