//////////////////////////////////////////////////////////////////////////////
//
// AVP_ServerEntity_InteractRetinalScanner.h
//
// Created by AJK 22/12/2008
//
// Copyright (c) 2008 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////


#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __AVP_SERVERENTITY_INTERACTRETINALSCANNER__
#define __AVP_SERVERENTITY_INTERACTRETINALSCANNER__

// AVP
#include "Entity/PhysicalObject/Interact/ToolReceptacle/AVP_ServerEntity_InteractToolReceptacle.h"

class AVP_ServerEntity_InteractRetinalScanner : public AVP_ServerEntity_InteractToolReceptacle
{
public:

	static AVP_ServerEntity_InteractRetinalScanner* Create(Asura_Guid uGuid)		  { return new AVP_ServerEntity_InteractRetinalScanner(uGuid); }
	static AVP_ServerEntity_InteractRetinalScanner* FindEntity(Asura_Guid uGuid)	  { return s_xList.FindEntity(uGuid); }
	static const Asura_Hashed_List<AVP_ServerEntity_InteractRetinalScanner>* GetList(){ return &s_xList; }    

	virtual bool	HandleMessage(const Asura_Message* pxMessage);
	virtual void	ReadFromChunkStream(Asura_Chunk_Stream& xStream);
	virtual void	WriteToChunkStream(Asura_Chunk_Stream& xStream) const;
	virtual bool	GetHasCreateMessage() const { return true; }
	virtual void	MakeCreateMessage( Asura_Guid uRequestingClient, bool bSendGuaranteed /*= false*/ );

#ifdef ASURA_TOOLS
	static void		CreateFromTools(Asura_Guid uGuid);
	virtual bool	CanBeIncludedInTemplate() const;
	virtual void    ApplyChangesForTemplateInstance( Tools_EntityTemplateInstance* pxInstance );
#endif // #ifdef ASURA_TOOLS

#ifdef ASURA_TOOLS
	virtual bool SupportsCustomEvents() const { return true; }
	virtual int GetNumCustomEvents() const { return NUM_MESSAGE_BLOCKS; }
	virtual unsigned short* GetCustomEvent(int iIndex);
	virtual void GetCustomEventName(int iEventIndex, Asura_String& xEventName);
#endif

	Asura_Hash_ID GetVictimBlueprintHash() const { return m_uVictimBlueprintHashID; }
	Asura_Hash_ID GetVictimBlueprintType() const { return m_uVictimBlueprintType;   } 

protected:

	enum
	{
		MESSAGE_BLOCK_PREDATOR_USE_HEAD,
		NUM_MESSAGE_BLOCKS,
	};

	AVP_ServerEntity_InteractRetinalScanner( Asura_Guid uGuid = ASURA_GUID_UNREGISTERED );
	virtual ~AVP_ServerEntity_InteractRetinalScanner();

	unsigned short	m_usPredatorUseHeadMessageBlock;

private:

	enum
	{
		CURRENT_CHUNK_VERSION = 0
	};

	void SendPredatorUseHeadMessage();

	Asura_Hash_ID m_uVictimBlueprintHashID;
	Asura_Hash_ID m_uVictimBlueprintType;

	typedef AVP_ServerEntity_InteractToolReceptacle PARENT;

#ifdef ASURA_TOOLS
	friend class ToolsAVP_Entity_InteractRetinalScanner;
#endif

	static Asura_Hashed_List<AVP_ServerEntity_InteractRetinalScanner> s_xList;
};

#endif // #ifndef __AVP_SERVERENTITY_INTERACTRETINALSCANNER__
