mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-06 10:47:45 +00:00
restyle it
This commit is contained in:
parent
05762be79c
commit
eb6a405e32
1 changed files with 39 additions and 83 deletions
|
@ -320,101 +320,57 @@ void Core::DebugCommandHandler::set( char * data, Entity::Player& player, boost:
|
||||||
{
|
{
|
||||||
pTerriMgr->disableCurrentFestival();
|
pTerriMgr->disableCurrentFestival();
|
||||||
}
|
}
|
||||||
else if ( subCommand == "BitFlag8" )
|
else if ( subCommand == "BitFlag" )
|
||||||
{
|
{
|
||||||
uint16_t questId;
|
uint16_t questId;
|
||||||
uint8_t questBit;
|
uint8_t questBit;
|
||||||
sscanf( params.c_str(), "%hu %hhu", &questId, &questBit );
|
int8_t BitFlag;
|
||||||
|
sscanf( params.c_str(), "%hu %hhu %hu", &BitFlag, &questId, &questBit );
|
||||||
|
|
||||||
if ( player.hasQuest( questId ) )
|
if( !player.hasQuest( questId ) )
|
||||||
{
|
{
|
||||||
if ( !questBit == 0 || !questId == 0 )
|
player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if( questBit == 0 || questId == 0 )
|
||||||
|
{
|
||||||
|
player.sendDebug( "Params are not correct" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ( BitFlag )
|
||||||
|
{
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
player.setQuestBitFlag8( questId, questBit, true );
|
player.setQuestBitFlag8( questId, questBit, true );
|
||||||
else
|
break;
|
||||||
player.sendDebug( "Params are not correct" );
|
}
|
||||||
}
|
case 16:
|
||||||
else
|
{
|
||||||
player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) );
|
|
||||||
}
|
|
||||||
else if ( subCommand == "BitFlag16" )
|
|
||||||
{
|
|
||||||
uint16_t questId;
|
|
||||||
uint8_t questBit;
|
|
||||||
sscanf( params.c_str(), "%hu %hhu", &questId, &questBit );
|
|
||||||
|
|
||||||
if( player.hasQuest( questId ) )
|
|
||||||
{
|
|
||||||
if( !questBit == 0 || !questId == 0 )
|
|
||||||
player.setQuestBitFlag16( questId, questBit, true );
|
player.setQuestBitFlag16( questId, questBit, true );
|
||||||
else
|
break;
|
||||||
player.sendDebug( "Params are not correct" );
|
}
|
||||||
}
|
case 24:
|
||||||
else
|
{
|
||||||
player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) );
|
|
||||||
}
|
|
||||||
else if ( subCommand == "BitFlag24" )
|
|
||||||
{
|
|
||||||
uint16_t questId;
|
|
||||||
uint8_t questBit;
|
|
||||||
sscanf( params.c_str(), "%hu %hhu", &questId, &questBit );
|
|
||||||
|
|
||||||
if( player.hasQuest( questId ) )
|
|
||||||
{
|
|
||||||
if( !questBit == 0 || !questId == 0 )
|
|
||||||
player.setQuestBitFlag24( questId, questBit, true );
|
player.setQuestBitFlag24( questId, questBit, true );
|
||||||
else
|
break;
|
||||||
player.sendDebug( "Params are not correct" );
|
}
|
||||||
}
|
case 32:
|
||||||
else
|
{
|
||||||
player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) );
|
|
||||||
}
|
|
||||||
else if ( subCommand == "BitFlag32" )
|
|
||||||
{
|
|
||||||
uint16_t questId;
|
|
||||||
uint8_t questBit;
|
|
||||||
sscanf( params.c_str(), "%hu %hhu", &questId, &questBit );
|
|
||||||
|
|
||||||
if( player.hasQuest( questId ) )
|
|
||||||
{
|
|
||||||
if( !questBit == 0 || !questId == 0 )
|
|
||||||
player.setQuestBitFlag32( questId, questBit, true );
|
player.setQuestBitFlag32( questId, questBit, true );
|
||||||
else
|
break;
|
||||||
player.sendDebug( "Params are not correct" );
|
}
|
||||||
}
|
case 40:
|
||||||
else
|
{
|
||||||
player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) );
|
|
||||||
}
|
|
||||||
else if ( subCommand == "BitFlag40" )
|
|
||||||
{
|
|
||||||
uint16_t questId;
|
|
||||||
uint8_t questBit;
|
|
||||||
sscanf( params.c_str(), "%hu %hhu", &questId, &questBit );
|
|
||||||
|
|
||||||
if( player.hasQuest( questId ) )
|
|
||||||
{
|
|
||||||
if( !questBit == 0 || !questId == 0 )
|
|
||||||
player.setQuestBitFlag40( questId, questBit, true );
|
player.setQuestBitFlag40( questId, questBit, true );
|
||||||
else
|
break;
|
||||||
player.sendDebug( "Params are not correct" );
|
}
|
||||||
}
|
case 48:
|
||||||
else
|
{
|
||||||
player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) );
|
|
||||||
}
|
|
||||||
else if ( subCommand == "BitFlag48" )
|
|
||||||
{
|
|
||||||
uint16_t questId;
|
|
||||||
uint8_t questBit;
|
|
||||||
sscanf( params.c_str(), "%hu %hhu", &questId, &questBit );
|
|
||||||
|
|
||||||
if( player.hasQuest( questId ) )
|
|
||||||
{
|
|
||||||
if( !questBit == 0 || !questId == 0 )
|
|
||||||
player.setQuestBitFlag48( questId, questBit, true );
|
player.setQuestBitFlag48( questId, questBit, true );
|
||||||
else
|
break;
|
||||||
player.sendDebug( "Params are not correct" );
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue