mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
Force model change debug command
This commit is contained in:
parent
0887bbec92
commit
fc578eb0c3
3 changed files with 30 additions and 0 deletions
|
@ -805,6 +805,12 @@ uint32_t Core::Entity::Player::getModelForSlot( Inventory::EquipSlot slot )
|
|||
return m_modelEquip[slot];
|
||||
}
|
||||
|
||||
void Core::Entity::Player::setModelForSlot( Inventory::EquipSlot slot, uint32_t val )
|
||||
{
|
||||
m_modelEquip[slot] = val;
|
||||
setSyncFlag( PlayerSyncFlags::Status );
|
||||
}
|
||||
|
||||
uint64_t Core::Entity::Player::getModelMainWeapon() const
|
||||
{
|
||||
return m_modelMainWeapon;
|
||||
|
|
|
@ -218,6 +218,8 @@ public:
|
|||
const uint32_t * getModelArray() const;
|
||||
/*! return the equipment model in a specified equipment slot */
|
||||
uint32_t getModelForSlot( Inventory::EquipSlot slot );
|
||||
/*! set the equipment model in a specified equipment slot */
|
||||
void setModelForSlot( Inventory::EquipSlot slot, uint32_t val );
|
||||
/*! return the current amount of currency of type */
|
||||
uint32_t getCurrency( uint8_t type ) const;
|
||||
/*! add amount to the currency of type */
|
||||
|
|
|
@ -254,6 +254,20 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye
|
|||
pPlayer->setEorzeaTimeOffset( timestamp );
|
||||
pPlayer->sendNotice( "Eorzea time offset: " + std::to_string( timestamp ) );
|
||||
}
|
||||
else if ( subCommand == "model" )
|
||||
{
|
||||
uint32_t slot;
|
||||
uint32_t val;
|
||||
sscanf( params.c_str(), "%d %d %d", &slot, &val );
|
||||
|
||||
pPlayer->setModelForSlot( static_cast<Inventory::EquipSlot>( slot ), val );
|
||||
pPlayer->sendModel();
|
||||
pPlayer->sendDebug( "Model updated" );
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->sendUrgent( subCommand + " is not a valid SET command." );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -359,6 +373,10 @@ void Core::DebugCommandHandler::add( char * data, Core::Entity::PlayerPtr pPlaye
|
|||
pPlayer->queuePacket(controlPacket);*/
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->sendUrgent( subCommand + " is not a valid ADD command." );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -400,6 +418,10 @@ void Core::DebugCommandHandler::get( char * data, Core::Entity::PlayerPtr pPlaye
|
|||
std::to_string( map_id ) + "\nZoneID: " +
|
||||
std::to_string( pPlayer->getCurrentZone()->getId() ) + "\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->sendUrgent( subCommand + " is not a valid GET command." );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue