#pragma once

#include "NetCli_Script.h"
#include <vector>

struct ScriptEventInfo
{
	ScriptEventInfo()
	{
		bRangeEvent		= false;
	};

	bool	bRangeEvent;
};

class CNetCli_Script_Child : public CNetCli_Script
{
public:
	static	bool	Init					();
	static	bool	Release					();

	static	int		OnTimeUpdate			( SchedularInfo* Obj , void* InputClass );
	//static	void	OnEvent_CastInterrupted	();
	//static	void	OnEvent_CastFinished	();
	//---------------------------------------------------------------
	//virtual void		OnTouchPlot				( CRoleSprite* pObj )	{ TouchEvent ( pObj->GetIdentify() ); }
	//virtual void		OnRangePlot				( CRoleSprite* pObj )	{ RangeEvent ( pObj->GetIdentify() ); }

	
		// QuestList 被點下, 有 iRoleID 表 Client 點下 Quest NPC
		// 若為 iRoleID == 0 表 Client 打開 Quest 清單

	virtual void		OnTouchQuestNPC					( int iRoleID );
	virtual void		OnTouchQuestObj					( int iObjID  );

	virtual void		OnAddObj						( int iObjID );
	virtual void		OnDelObj						( int iObjID );

	//virtual void	OnTouchQuestNPC			( CRoleSprite* pObj );
	//virtual void	OnTouchQuestObj			( CRoleSprite* pObj );

	//virtual void	OnAdd_Obj				( CRoleSprite* pObj );
	//virtual void	OnDel_Obj				( CRoleSprite* pObj );


	//virtual void	OnUpdate				();

	//virtual void	OnQuestDetail			( int iQuestID , int iMode );

	virtual void		OnQuestAcceptResult			( int iQuestField, int iQuestID, EM_QUESTCHECK_RESULT emResult );
	virtual void		OnQuestCompleteResult		( int iQuestField, int iQuestID, EM_QUESTCHECK_RESULT emResult );
	virtual void		OnQuestDeleteResult			( int iQuestField, int iQuestID, EM_QUESTCHECK_RESULT emResult );
	virtual void		OnClickQuestObjResult		( int iResult, int iItemID );
	virtual void		OnQuestKillObjNotify		( int iQuestField, int iQuestID, int iDeadObjID );

	//virtual void	AcceptQuest				( int iQuestID );
	//virtual void	CompleteQuest			( int iQuestID );
	
	virtual void		OnKillObj				( int iRoleID );


	virtual void		OnQuestFlag				( int iQuestID,	int iValue );

	virtual void		OnPlayMotion			( int iObjID, const char* pszMotion );

	// 資料
	//---------------------------------------------------------------

	// 觸碰 QuestObj 時處理資訊
	//int				m_pTouchObj_ID;
	int				m_pTouchObj_QuestField;

	//static CRoleSprite*				m_pLastTouchObj;
	static int						m_iLastTouchObjID;
	static vector< CRoleSprite* >	m_vecUnProcessRole;
	static vector< CRoleSprite* >	m_vecQuestRole;
	//static vector< CRoleSprite* >	m_vecRangePlotRole;
	//static map< CRoleSprite* , ScriptEventInfo* > m_mapRangePlot;

};

