1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-29 07:37:45 +00:00
sapphire/src/world/Network/PacketWrappers/UpdateHpMpTpPacket.h

35 lines
690 B
C
Raw Normal View History

2017-08-08 13:53:47 +02:00
#ifndef _UPDATEHPMPTP_H
#define _UPDATEHPMPTP_H
2019-03-08 15:34:38 +01:00
#include <Network/GamePacket.h>
#include <Actor/Chara.h>
#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 UpdateHpMpTpPacket : public ZoneChannelPacket< FFXIVIpcUpdateHpMpTp >
{
2018-10-28 21:53:21 +01:00
public:
UpdateHpMpTpPacket( Entity::Chara& actor ) :
ZoneChannelPacket< FFXIVIpcUpdateHpMpTp >( actor.getId(), actor.getId() )
{
initialize( actor );
};
private:
void initialize( Entity::Chara& actor )
{
m_data.hp = actor.getHp();
m_data.mp = actor.getMp();
m_data.tp = actor.getTp();
};
};
2017-08-08 13:53:47 +02:00
}
#endif /*_UPDATEHPMPTP_H*/