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

33 lines
698 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
2019-03-08 15:34:38 +01:00
#include <Network/GamePacket.h>
2017-08-08 13:53:47 +02:00
#include "Forwards.h"
2017-08-08 13:53:47 +02:00
namespace Sapphire::Network::Packets::Server
2017-08-08 13:53:47 +02:00
{
2018-10-28 21:53:21 +01:00
/**
* @brief The Ping response packet.
*/
class PingPacket : public ZoneChannelPacket< FFXIVIpcPing >
{
2018-10-28 21:53:21 +01:00
public:
PingPacket( Entity::Player& player, int32_t inVal ) :
ZoneChannelPacket< FFXIVIpcPing >( player.getId(), player.getId() )
{
initialize( player, inVal );
};
private:
void initialize( Entity::Player& player, int32_t inVal )
{
m_data.timeInMilliseconds = 0x000014D00000000 + inVal;
};
};
2017-08-08 13:53:47 +02:00
}
#endif /*_CORE_NETWORK_PACKETS_CPINGPACKET_H*/