#pragma once

#include "td/protocol/Protocol.h"

namespace td {
namespace protocol {

class UpdateMoneyPacket : public Packet {
private:
	std::uint32_t m_NewAmount;
public:
	UpdateMoneyPacket() {}
	UpdateMoneyPacket(std::uint32_t newAmount) : m_NewAmount(newAmount) {}
	virtual ~UpdateMoneyPacket() {}

	std::uint32_t GetGold() const { return m_NewAmount; }

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

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

} // namespace protocol
} // namespace td
