1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-30 08:07:46 +00:00

Made the @set eorzeatime A GM Command

The @set eorzeatime Command is now //gm time <Value>
This commit is contained in:
Biscuit Boy 2017-09-23 00:09:59 +10:00
parent 02b8df5763
commit f694a5ad98
2 changed files with 9 additions and 5 deletions

View file

@ -40,7 +40,6 @@ extern Core::ServerZone g_serverZone;
// instanciate and initialize commands // instanciate and initialize commands
Core::DebugCommandHandler::DebugCommandHandler() Core::DebugCommandHandler::DebugCommandHandler()
{ {
// Push all commands onto the register map ( command name - function - description - required GM level ) // Push all commands onto the register map ( command name - function - description - required GM level )
registerCommand( "set", &DebugCommandHandler::set, "Loads and injects a premade Packet.", 1 ); registerCommand( "set", &DebugCommandHandler::set, "Loads and injects a premade Packet.", 1 );
registerCommand( "get", &DebugCommandHandler::get, "Loads and injects a premade Packet.", 1 ); registerCommand( "get", &DebugCommandHandler::get, "Loads and injects a premade Packet.", 1 );
@ -186,8 +185,8 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye
else if( ( subCommand == "unlockaetheryte" ) && ( params != "" ) ) else if( ( subCommand == "unlockaetheryte" ) && ( params != "" ) )
{ {
for( uint8_t i = 0; i < 255; i++ ) for( uint8_t i = 0; i < 255; i++ )
pPlayer->registerAetheryte( i ); pPlayer->registerAetheryte( i );
} }
else if( ( subCommand == "discovery" ) && ( params != "" ) ) else if( ( subCommand == "discovery" ) && ( params != "" ) )
@ -255,14 +254,13 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye
else if( subCommand == "aaah" ) else if( subCommand == "aaah" )
{ {
int32_t id; int32_t id;
sscanf( params.c_str(), "%d", &id ); sscanf( params.c_str(), "%d", &id );
pPlayer->sendDebug( std::to_string( pPlayer->actionHasCastTime( id ) ) ); pPlayer->sendDebug( std::to_string( pPlayer->actionHasCastTime( id ) ) );
} }
else if ( subCommand == "cfpenalty" ) else if ( subCommand == "cfpenalty" )
{ {
int32_t minutes; int32_t minutes;
sscanf( params.c_str(), "%d", &minutes ); sscanf( params.c_str(), "%d", &minutes );
pPlayer->setCFPenaltyMinutes( minutes ); pPlayer->setCFPenaltyMinutes( minutes );

View file

@ -253,6 +253,12 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac
pPlayer->sendUrgent( "Item " + std::to_string( param1 ) + " not found..." ); pPlayer->sendUrgent( "Item " + std::to_string( param1 ) + " not found..." );
break; break;
} }
case GmCommand::Time:
{
pPlayer->setEorzeaTimeOffset( param2 );
pPlayer->sendNotice( "Eorzea time offset: " + std::to_string( param2 ) );
break;
}
case GmCommand::Weather: case GmCommand::Weather:
{ {
targetPlayer->getCurrentZone()->setWeatherOverride( param1 ); targetPlayer->getCurrentZone()->setWeatherOverride( param1 );