#pragma once

#include "td/protocol/Protocol.h"
#include "td/game/BaseGame.h"

namespace td {
namespace protocol {

class UpgradeTowerPacket : public Packet {
private:
	game::TowerID m_TowerID;
	game::TowerLevel m_TowerLevel;
public:
	UpgradeTowerPacket() {}
	UpgradeTowerPacket(game::TowerID tower, game::TowerLevel level) : m_TowerID(tower), m_TowerLevel(level) {}
	virtual ~UpgradeTowerPacket() {}

	virtual DataBuffer Serialize(bool packetID = true) const;
	virtual void Deserialize(DataBuffer& data);
	virtual void Dispatch(PacketHandler* handler) const;

	game::TowerID GetTowerID() const { return m_TowerID; }
	game::TowerLevel GetTowerLevel() const { return m_TowerLevel; }

	virtual PacketType GetType() const { return PacketType::UpgradeTower; }
};

} // namespace protocol
} // namespace td
