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

34 lines
705 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
2018-03-06 22:22:19 +01:00
#include <Network/GamePacketNew.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*/