mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
commit
d4a99fd45a
5 changed files with 33 additions and 6 deletions
|
@ -116,6 +116,7 @@ namespace Packets {
|
|||
WeatherChange = 0x01AF, // updated for sb
|
||||
Discovery = 0x01B2, // updated for sb
|
||||
|
||||
EorzeaTimeOffset = 0x01B4,
|
||||
|
||||
CFAvailableContents = 0x01CF,
|
||||
|
||||
|
|
|
@ -1281,6 +1281,11 @@ struct FFXIVIpcCFMemberStatus : FFXIVIpcBasePacket<CFMemberStatus>
|
|||
uint32_t unknown3;
|
||||
};
|
||||
|
||||
struct FFXIVIpcEorzeaTimeOffset : FFXIVIpcBasePacket<EorzeaTimeOffset>
|
||||
{
|
||||
uint64_t timestamp;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} /* Server */
|
||||
|
|
|
@ -1668,3 +1668,14 @@ void Core::Entity::Player::setOpeningSequence( uint8_t seq )
|
|||
setSyncFlag( OpeningSeq );
|
||||
m_openingSequence = seq;
|
||||
}
|
||||
|
||||
/// Tells client to offset their eorzean time by given timestamp.
|
||||
void Core::Entity::Player::setEorzeaTimeOffset( uint64_t timestamp )
|
||||
{
|
||||
// TODO: maybe change to persistent?
|
||||
GamePacketNew< FFXIVIpcEorzeaTimeOffset, ServerZoneIpcType > packet ( getId() );
|
||||
packet.data().timestamp = timestamp;
|
||||
|
||||
// Send to single player
|
||||
queuePacket( packet );
|
||||
}
|
||||
|
|
|
@ -499,6 +499,10 @@ public:
|
|||
|
||||
uint32_t getCFPenaltyMinutes() const;
|
||||
void setCFPenaltyMinutes( uint32_t minutes );
|
||||
|
||||
void setEorzeaTimeOffset( uint64_t timestamp );
|
||||
|
||||
|
||||
private:
|
||||
uint32_t m_lastWrite;
|
||||
uint32_t m_lastPing;
|
||||
|
|
|
@ -40,7 +40,6 @@ extern Core::ServerZone g_serverZone;
|
|||
// instanciate and initialize commands
|
||||
Core::DebugCommandHandler::DebugCommandHandler()
|
||||
{
|
||||
|
||||
// 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( "get", &DebugCommandHandler::get, "Loads and injects a premade Packet.", 1 );
|
||||
|
@ -255,18 +254,25 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye
|
|||
else if( subCommand == "aaah" )
|
||||
{
|
||||
int32_t id;
|
||||
|
||||
sscanf( params.c_str(), "%d", &id );
|
||||
|
||||
pPlayer->sendDebug( std::to_string( pPlayer->actionHasCastTime( id ) ) );
|
||||
}
|
||||
else if ( subCommand == "cfpenalty" )
|
||||
{
|
||||
int32_t minutes;
|
||||
|
||||
sscanf( params.c_str(), "%d", &minutes );
|
||||
|
||||
pPlayer->setCFPenaltyMinutes( minutes );
|
||||
}
|
||||
else if ( subCommand == "eorzeatime" )
|
||||
{
|
||||
uint64_t timestamp;
|
||||
sscanf( params.c_str(), "%llu", ×tamp );
|
||||
|
||||
pPlayer->setEorzeaTimeOffset( timestamp );
|
||||
pPlayer->sendNotice( "Eorzea time offset: " + std::to_string( timestamp ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue