mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-23 21:27:45 +00:00
Merge pull request #333 from NotAdam/develop
packet injection & unlock action debug command
This commit is contained in:
commit
f13c0d84be
5 changed files with 20 additions and 4 deletions
|
@ -246,6 +246,15 @@ public:
|
||||||
m_segHdr.size = size;
|
m_segHdr.size = size;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
FFXIVRawPacket( char* data, uint16_t size ) :
|
||||||
|
m_data( std::vector< uint8_t >( size ) )
|
||||||
|
{
|
||||||
|
auto segmentHdrSize = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER );
|
||||||
|
|
||||||
|
memcpy( &m_data[0], data + segmentHdrSize, size - segmentHdrSize );
|
||||||
|
memcpy( &m_segHdr, data, segmentHdrSize );
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t getContentSize() override
|
uint32_t getContentSize() override
|
||||||
{
|
{
|
||||||
return m_data.size();
|
return m_data.size();
|
||||||
|
|
|
@ -562,7 +562,7 @@ void Core::Entity::Player::changePosition( float x, float y, float z, float o )
|
||||||
m_queuedZoneing = boost::make_shared<QueuedZoning>( getZoneId(), pos, Util::getTimeMs(), o );
|
m_queuedZoneing = boost::make_shared<QueuedZoning>( getZoneId(), pos, Util::getTimeMs(), o );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::Entity::Player::learnAction( uint8_t actionId )
|
void Core::Entity::Player::learnAction( uint16_t actionId )
|
||||||
{
|
{
|
||||||
uint16_t index;
|
uint16_t index;
|
||||||
uint8_t value;
|
uint8_t value;
|
||||||
|
|
|
@ -419,7 +419,7 @@ public:
|
||||||
/*! update bitmask for how-to's seen */
|
/*! update bitmask for how-to's seen */
|
||||||
void updateHowtosSeen( uint32_t howToId );
|
void updateHowtosSeen( uint32_t howToId );
|
||||||
/*! learn an action / update the unlock bitmask. */
|
/*! learn an action / update the unlock bitmask. */
|
||||||
void learnAction( uint8_t actionId );
|
void learnAction( uint16_t actionId );
|
||||||
/*! learn a song / update the unlock bitmask. */
|
/*! learn a song / update the unlock bitmask. */
|
||||||
void learnSong( uint8_t songId, uint32_t itemId );
|
void learnSong( uint8_t songId, uint32_t itemId );
|
||||||
/*! check if an action is already unlocked in the bitmask. */
|
/*! check if an action is already unlocked in the bitmask. */
|
||||||
|
|
|
@ -423,6 +423,13 @@ void Core::DebugCommandHandler::add( char * data, Entity::Player& player, boost:
|
||||||
player.queuePacket( controlPacket );*/
|
player.queuePacket( controlPacket );*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if( subCommand == "unlock" )
|
||||||
|
{
|
||||||
|
uint32_t id;
|
||||||
|
|
||||||
|
sscanf( params.c_str(), "%d", &id );
|
||||||
|
player.learnAction( id );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.sendUrgent( subCommand + " is not a valid ADD command." );
|
player.sendUrgent( subCommand + " is not a valid ADD command." );
|
||||||
|
|
|
@ -362,8 +362,8 @@ void Core::Network::GameConnection::injectPacket( const std::string& packetpath,
|
||||||
if( pSize == 0 )
|
if( pSize == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: fix injection for new packets
|
queueOutPacket( FFXIVPacketBasePtr( new FFXIVRawPacket( packet + k, pSize ) ) );
|
||||||
//queueOutPacket( GamePacketPtr( new GamePacket( packet + k, pSize, false ) ) );
|
|
||||||
k += ( pSize );
|
k += ( pSize );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue