1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-25 19:17:45 +00:00
sapphire/src/servers/Server_Zone/Network/PacketWrappers/UpdateHpMpTpPacket.h

39 lines
1,011 B
C
Raw Normal View History

2017-08-08 13:53:47 +02:00
#ifndef _UPDATEHPMPTP_H
#define _UPDATEHPMPTP_H
#include "Forwards.h"
2017-12-11 16:55:05 +11:00
#include <Actor/Actor.h>
#include <Server_Common/Network/GamePacketNew.h>
2017-08-08 13:53:47 +02:00
namespace Core {
namespace Network {
2017-12-11 16:55:05 +11:00
namespace Packets {
namespace Server {
2017-08-08 13:53:47 +02:00
2017-12-11 16:55:05 +11:00
/**
* @brief The Ping response packet.
*/
class UpdateHpMpTpPacket : public ZoneChannelPacket< FFXIVIpcUpdateHpMpTp >
{
public:
UpdateHpMpTpPacket( Entity::ActorPtr pActor ) :
ZoneChannelPacket< FFXIVIpcUpdateHpMpTp >( pActor->getId(), pActor->getId() )
{
initialize( pActor );
};
2017-08-08 13:53:47 +02:00
2017-12-11 16:55:05 +11:00
private:
void initialize( Entity::ActorPtr pActor )
{
m_data.hp = pActor->getHp();
m_data.mp = pActor->getMp();
m_data.tp = pActor->getTp();
};
};
2017-08-08 13:53:47 +02:00
2017-12-11 16:55:05 +11:00
} // namespace Server
} // namespace Packets
} // namespace Network
} // namespace Core
2017-08-08 13:53:47 +02:00
#endif /*_UPDATEHPMPTP_H*/