//////////////////////////////////////////////////////////////////////////////
//
// AVP_ClientEntity_InteractToolReceptacle.h
//
// Created by AJK 25/11/2008
//
// Copyright (c) 2008 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef AVP_CLIENTENTITY_INTERACTTOOLRECEPTACLE
#define AVP_CLIENTENTITY_INTERACTTOOLRECEPTACLE

// AVP
#include "Entity/PhysicalObject/Interact/AVP_ClientEntity_InteractObject.h"

class AVP_Message_InteractToolReceptacle_ClientCreate;
class AVP_ServerEntity_Actor;

class AVP_ClientEntity_InteractToolReceptacle : public AVP_ClientEntity_InteractObject
{
public:

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

	virtual bool	HandleMessage(const Asura_Message* pxMessage);
	virtual InteractionType GetInteractionObjectType() const { return INTERACTION_TYPE_TOOLRECEPTACLE; };
	virtual void		  PlayToolAnim(const Asura_Guid uToolGuid, Asura_Hash_ID uAnim);

	void ProcessClientCreate( const AVP_Message_InteractToolReceptacle_ClientCreate* pxData, float fServerTime, bool bProcessPosAndOri );
	bool IsToolInside() const { return m_bToolInside; }
	Asura_Hash_ID GetToolRestAnim() const { return m_uPickupRestAnim; }
	Asura_Hash_ID GetToolUseAnim()  const { return m_uPickupUseAnim; }

protected:
	AVP_ClientEntity_InteractToolReceptacle();
	virtual ~AVP_ClientEntity_InteractToolReceptacle();

	virtual void		  InitialiseFromBlueprint( const Asura_Blueprint& xBlueprint );
	virtual Asura_Guid	  GetToolGuidFromActor (const AVP_ServerEntity_Actor& xActor) const { return ASURA_GUID_UNREGISTERED; }
	virtual Asura_Hash_ID GetToolAnimRelatedToMove(Asura_Hash_ID uMoveHash);

	Asura_Hash_ID			m_uPickupUseAnim;
	Asura_Hash_ID			m_uPickupRestAnim;
	bool                    m_bToolInside;

private:

	static Asura_Hashed_List<AVP_ClientEntity_InteractToolReceptacle> s_xList;
	typedef AVP_ClientEntity_InteractObject PARENT;
};

#endif // #ifndef AVP_CLIENTENTITY_INTERACTTOOLRECEPTACLE
