mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-01 16:37:45 +00:00
Cleanup
This commit is contained in:
parent
b0a2eb853a
commit
4bb0cd0f7b
3 changed files with 3 additions and 6 deletions
|
@ -98,5 +98,5 @@ void Core::Network::Packets::GamePacket::savePacket()
|
|||
|
||||
std::string Core::Network::Packets::GamePacket::toString() const
|
||||
{
|
||||
return Core::Util::binaryToHexString( const_cast<uint8_t *>(&m_dataBuf[0]), getSize() );
|
||||
return Core::Util::binaryToHexDump( const_cast<uint8_t *>( &m_dataBuf[0] ), getSize() );
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ std::string Core::Util::binaryToHexString(uint8_t* pBinData, uint16_t size)
|
|||
std::string Core::Util::binaryToHexDump( uint8_t* pBinData, uint16_t size )
|
||||
{
|
||||
int bytesPerLine = 16;
|
||||
std::string hexChars = "0123456789ABCDEF";
|
||||
constexpr char hexChars[] = "0123456789ABCDEF";
|
||||
|
||||
int offsetBlock = 8 + 3;
|
||||
int byteBlock = offsetBlock + bytesPerLine * 3 + ( bytesPerLine - 1 ) / 8 + 2;
|
||||
|
@ -62,7 +62,7 @@ std::string Core::Util::binaryToHexDump( uint8_t* pBinData, uint16_t size )
|
|||
uint8_t by = pBinData[i + j];
|
||||
line[hexColumn] = hexChars[( by >> 4 ) & 0xF];
|
||||
line[hexColumn + 1] = hexChars[by & 0xF];
|
||||
line[charColumn] = by < 32 ? '.' : static_cast<char>(by);
|
||||
line[charColumn] = by < 32 ? '.' : static_cast<char>( by );
|
||||
}
|
||||
|
||||
hexColumn += 3;
|
||||
|
|
|
@ -42,9 +42,6 @@ using namespace Core::Network::Packets::Server;
|
|||
void Core::Network::GameConnection::skillHandler( const Packets::GamePacket& inPacket,
|
||||
Entity::PlayerPtr pPlayer )
|
||||
{
|
||||
|
||||
g_log.debug( inPacket.toString() );
|
||||
|
||||
uint8_t type = inPacket.getValAt< uint32_t >( 0x21 );
|
||||
|
||||
uint32_t action = inPacket.getValAt< uint32_t >( 0x24 );
|
||||
|
|
Loading…
Add table
Reference in a new issue