1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 22:57:45 +00:00
sapphire/src/servers/Server_Zone/Network/PacketWrappers/PingPacket.h

38 lines
740 B
C
Raw Normal View History

2017-08-08 13:53:47 +02:00
#ifndef _CORE_NETWORK_PACKETS_PINGPACKET_H
#define _CORE_NETWORK_PACKETS_PINGPACKET_H
#include <Server_Common/GamePacketNew.h>
#include "src/servers/Server_Zone/Forwards.h"
2017-08-08 13:53:47 +02:00
namespace Core {
namespace Network {
namespace Packets {
namespace Server {
/**
* @brief The Ping response packet.
*/
class PingPacket :
public GamePacketNew<FFXIVIpcPing>
{
public:
PingPacket( Entity::PlayerPtr player, int32_t inVal ) :
GamePacketNew<FFXIVIpcPing>( player->getId(), player->getId() )
{
initialize( player, inVal );
};
private:
void initialize( Entity::PlayerPtr player, int32_t inVal )
{
m_data.timeInMilliseconds = 0x000014D00000000 + inVal;
};
};
}
}
}
}
#endif /*_CORE_NETWORK_PACKETS_CPINGPACKET_H*/