1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-01 16:37:45 +00:00

Merge pull request #195 from perize/master

Perform fix
This commit is contained in:
Mordred 2017-12-11 00:05:24 +01:00 committed by GitHub
commit 14eafd13b8
2 changed files with 15 additions and 9 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

@ -601,10 +601,10 @@ void Core::Network::GameConnection::tellHandler( const Packets::GamePacket& inPa
void Core::Network::GameConnection::performNoteHandler( const Packets::GamePacket& inPacket,
Entity::Player& player )
{
GamePacketNew< FFXIVIpcPerformNote, ServerZoneIpcType > performPacket( player.getId() );
ZoneChannelPacket< FFXIVIpcPerformNote > 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 );
}