restructure project
This commit is contained in:
29
include/td/protocol/packets/UpdateCastleLifePacket.h
Normal file
29
include/td/protocol/packets/UpdateCastleLifePacket.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "td/protocol/Protocol.h"
|
||||
#include "td/game/BaseGame.h"
|
||||
|
||||
namespace td {
|
||||
namespace protocol {
|
||||
|
||||
class UpdateCastleLifePacket : public Packet {
|
||||
private:
|
||||
std::uint16_t m_CastleLife;
|
||||
game::TeamColor m_Team;
|
||||
public:
|
||||
UpdateCastleLifePacket() {}
|
||||
UpdateCastleLifePacket(std::uint16_t life, game::TeamColor team) : m_CastleLife(life), m_Team(team) {}
|
||||
virtual ~UpdateCastleLifePacket() {}
|
||||
|
||||
virtual DataBuffer Serialize(bool packetID = true) const;
|
||||
virtual void Deserialize(DataBuffer& data);
|
||||
virtual void Dispatch(PacketHandler* handler) const;
|
||||
|
||||
std::uint16_t GetCastleLife() const { return m_CastleLife; }
|
||||
game::TeamColor GetTeamColor() const { return m_Team; }
|
||||
|
||||
virtual PacketType GetType() const { return PacketType::UpdateCastleLife; }
|
||||
};
|
||||
|
||||
} // namespace protocol
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user