//////////////////////////////////////////////////////////////////////////////
//
// AVP_Player_Quest.h
//
// (AJK - 13.10.2008) Created
//
// Copyright (c) 2008 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef __AVP_PLAYER_QUEST__
#define __AVP_PLAYER_QUEST__

class Asura_Chunk_Stream;

class AVP_Player_Quest
{

public :          
    AVP_Player_Quest();

	enum
	{
		MAX_OBJECTIVES = 20
	};

	// Get Objective List
	const Asura_Guid* GetObjectivesList()   const { return m_auObjectivesList; }

	// Get Objectives count
	u_int GetObjectivesCount()   const { return m_uObjectivesCount; }
	void  SetObjectivesCount  (u_int uCount)  { m_uObjectivesCount   =  uCount;}
	void  SetObjective   (u_int uIndex, Asura_Guid uGuid)  { m_auObjectivesList[uIndex]   =  uGuid;}

	void AddToObjectivesList   (Asura_Guid uObjective);
	void AddToCompletedObjectivesList (Asura_Guid uObjective);
	bool IsObjectiveInList     (Asura_Guid uObjective);

	Asura_Guid GetLatestNonCompletedObjective() const;

	Asura_Guid GetRankedObjective( u_int iRank ) const;
	Asura_Guid GetRankedNonCompletedObjective( u_int iRank )const;
	Asura_Guid GetRankedCompletedObjective( u_int iRank )const;
	u_int GetNonCompletedObjectiveCount() const;

	void WriteToChunkStream(Asura_Chunk_Stream& xStream) const;
	void ReadFromChunkStream(Asura_Chunk_Stream& xStream);

	AVP_Player_Quest& operator=(const AVP_Player_Quest& xOther);

private:
	void InitObjectivesList ();

	u_int      m_uObjectivesCount;
	u_int      m_uCompletedObjectivesCount;

	Asura_Guid m_auObjectivesList[ MAX_OBJECTIVES ]; // List of objectives, primary
	Asura_Guid m_auCompletedObjectivesList[ MAX_OBJECTIVES ]; // List of completed objectives

};

#endif // #ifndef __AVP_PLAYER_QUEST__
