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

Error message now displayed properly when /tell ing unknown char

This commit is contained in:
Mordred 2017-08-23 17:39:59 +02:00
parent d6711a0119
commit a1fb3bd419
5 changed files with 24 additions and 10 deletions

View file

@ -50,7 +50,7 @@ Core::Network::Packets::GamePacket::GamePacket( char * pData, uint16_t size, boo
*reinterpret_cast< uint32_t* >( &m_dataBuf[0] + 0x18 ) = m_timeStamp;
}
m_segHdr._reserved_E = 0;
//m_segHdr._reserved_E = 0;
m_segHdr.size = *reinterpret_cast< uint32_t* >( &m_dataBuf[0] );
m_segHdr.type = *reinterpret_cast< uint16_t* >( &m_dataBuf[0] + 0x0C );
m_subType = *reinterpret_cast< uint16_t* >( &m_dataBuf[0] + 0x12 );

View file

@ -35,6 +35,8 @@ void Core::Network::Packets::PacketContainer::fillSendBuffer( std::vector< uint8
using namespace std::chrono;
auto ms = duration_cast< milliseconds >( system_clock::now().time_since_epoch() );
uint64_t tick = ms.count();
m_ipcHdr.unknown_0 = 0xE2465DFF41a05252;
m_ipcHdr.unknown_8 = 0x75C4997B4D642A7F;
m_ipcHdr.timestamp = tick;
m_ipcHdr.unknown_20 = 1;

View file

@ -413,7 +413,8 @@ void Core::Entity::Player::setZone( uint32_t zoneId )
GamePacketNew< FFXIVIpcInitZone, ServerZoneIpcType > initZonePacket( getId() );
initZonePacket.data().zoneId = getCurrentZone()->getLayoutId();
initZonePacket.data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() );
initZonePacket.data().bitmask = 0x2A;
initZonePacket.data().bitmask = 0x1;
initZonePacket.data().unknown5 = 0x2A;
initZonePacket.data().pos.x = getPos().x;
initZonePacket.data().pos.y = getPos().y;
initZonePacket.data().pos.z = getPos().z;

View file

@ -351,27 +351,37 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets:
if( !m_pSession && session )
m_pSession = session;
GamePacket pPe( 0x00, 0x18, 0, 0, 0x07 );
//pPe.setValAt< uint32_t >( 0x10, 0xE0000005 );
pPe.setValAt< uint32_t >( 0x10, 0xE0037603 );
pPe.setValAt< uint32_t >( 0x14, static_cast< uint32_t >( time( nullptr ) ) );
sendSinglePacket( &pPe );
// main connection, assinging it to the session
if( ipcHeader.connectionType == ConnectionType::Zone )
{
pPe = GamePacket( 0x00, 0x38, 0, 0, 0x02 );
pPe.setValAt< uint32_t >( 0x10, playerId );
sendSinglePacket( &pPe );
g_log.info( "[" + std::string( id ) + "] Setting session for zone connection" );
session->setZoneConnection( pCon );
}
// chat connection, assinging it to the session
else if( ipcHeader.connectionType == ConnectionType::Chat )
{
pPe = GamePacket( 0x00, 0x38, 0, 0, 0x02 );
pPe.setValAt< uint32_t >( 0x10, playerId );
sendSinglePacket( &pPe );
g_log.info( "[" + std::string( id ) + "] Setting session for chat connection" );
session->setChatConnection( pCon );
pPe = GamePacket( 0x02, 0x28, playerId, playerId, 0x03 );
sendSinglePacket( &pPe );
}
GamePacket pPe( 0x00, 0x18, 0, 0, 0x07 );
pPe.setValAt< uint32_t >( 0x10, 0xE0000005 );
pPe.setValAt< uint32_t >( 0x14, static_cast< uint32_t >( time( nullptr ) ) );
sendSinglePacket( &pPe );
pPe = GamePacket( 0x00, 0x38, 0, 0, 0x02 );
pPe.setValAt< uint32_t >( 0x10, playerId );
sendSinglePacket( &pPe );
break;

View file

@ -557,7 +557,8 @@ void Core::Network::GameConnection::tellHandler( const Packets::GamePacket& inPa
{
GamePacketNew< FFXIVIpcTellErrNotFound, ServerChatIpcType > tellErrPacket( pPlayer->getId() );
strcpy( tellErrPacket.data().receipientName, targetPcName.c_str() );
pPlayer->queueChatPacket( tellErrPacket );
sendSinglePacket( tellErrPacket );
g_log.debug( "TargetPc not found" );
return;
}