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

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef AVP_CLIENTENTITY_INTERACTPREDATOR_LOCK
#define AVP_CLIENTENTITY_INTERACTPREDATOR_LOCK

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

class AVP_Message_InteractPredatorLock_ClientCreate;

class AVP_ClientEntity_InteractPredator_Lock : public AVP_ClientEntity_InteractObject
{
public:

	static void															    Create( const Asura_Message* pxMsg );
	static AVP_ClientEntity_InteractPredator_Lock*							FindEntity( Asura_Guid uGuid )				{ return s_xList.FindEntity( uGuid ); }
	static const Asura_Hashed_List<AVP_ClientEntity_InteractPredator_Lock>*	GetList()			{ return &s_xList; }

	virtual bool	HandleMessage(const Asura_Message* pxMessage);
	virtual void	OnInteraction( const bool bOn );
	virtual InteractionType GetInteractionObjectType() const { return INTERACTION_TYPE_PREDATOR_LOCK; };
	virtual bool IsActorUsingRightInteractionItem(const AVP_ClientEntity_Actor& xActor) const;

	void GetPlugKeyAnimHashes		( u_int uClassification, Asura_Hash_ID& uHUDAnimHash, Asura_Hash_ID& uTPAnimHash ) const;
	void GetUnPlugKeyAnimHashes		( u_int uClassification, Asura_Hash_ID& uHUDAnimHash, Asura_Hash_ID& uTPAnimHash ) const;
	void GetTurnRightAnimHashes	    ( u_int uClassification, Asura_Hash_ID& uHUDAnimHash, Asura_Hash_ID& uTPAnimHash ) const;
	void GetTurnLeftAnimHashes		( u_int uClassification, Asura_Hash_ID& uHUDAnimHash, Asura_Hash_ID& uTPAnimHash ) const;
	void GetStandStillAnimHashes    ( u_int uClassification, Asura_Hash_ID& uHUDAnimHash, Asura_Hash_ID& uTPAnimHash ) const;

protected:
	AVP_ClientEntity_InteractPredator_Lock();
	virtual ~AVP_ClientEntity_InteractPredator_Lock();

	void    ProcessClientCreate( const AVP_Message_InteractPredatorLock_ClientCreate* pxData, float fServerTime, bool bProcessPosAndOri );

	virtual void	InitialiseFromBlueprint( const Asura_Blueprint& xBlueprint );

private:

	Asura_Hash_ID GetLockAnimHash() const;

	// Lock anims
	Asura_Hash_ID			m_uReachPosition1AnimID;
	Asura_Hash_ID			m_uReachPosition2AnimID;
	Asura_Hash_ID			m_uReachPosition3AnimID;
	Asura_Hash_ID			m_uReachPosition4AnimID;

	Asura_Hash_ID			m_uLeavePosition1AnimID;
	Asura_Hash_ID			m_uLeavePosition2AnimID;
	Asura_Hash_ID			m_uLeavePosition3AnimID;
	Asura_Hash_ID			m_uLeavePosition4AnimID;

	// Predator anims
	Asura_Hash_ID			m_uPlugKeyHUD;
	Asura_Hash_ID			m_uPlugKeyTP;
	Asura_Hash_ID			m_uStandStillHUD;
	Asura_Hash_ID			m_uStandStillTP;
	Asura_Hash_ID			m_uTurnLeftHUD;
	Asura_Hash_ID			m_uTurnLeftTP;
	Asura_Hash_ID			m_uTurnRightHUD;
	Asura_Hash_ID			m_uTurnRightTP;
	Asura_Hash_ID			m_uUnPlugKeyHUD;
	Asura_Hash_ID			m_uUnPlugKeyTP;

	u_char					m_cLockCurrentPosition;              // From 1 to 4

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

#endif // #ifndef AVP_CLIENTENTITY_INTERACTPREDATOR_LOCK
