#pragma once

#include "blitz/game/Player.h"
#include "blitz/protocol/Protocol.h"

namespace blitz {
namespace protocol {

class PlayerShootPacket : public Packet {
  private:
	game::PlayerID m_Player;  // only used when sent to client
	Vec3f m_Position;
	float m_Yaw, m_Pitch;

  public:
	PlayerShootPacket() {}
	PlayerShootPacket(Vec3f position, float yaw, float pitch, game::PlayerID player = 0) :
		m_Position(position), m_Yaw(yaw), m_Pitch(pitch), m_Player(player) {}
	virtual ~PlayerShootPacket() {}

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

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

}  // namespace protocol
}  // namespace blitz