// ### Open SanAndreas ###
// (c) 2008 Stanislav "listener" Golovin
//
// AI tasks

// task ID

#pragma pack(push, 1)
class CTaskBase {
public:
	CTaskBase () { _f4 = 0; }
	virtual ~CTaskBase () {}

	virtual CTaskBase * clone () = 0;
	virtual CTaskBase * _m08 () = 0;	// getParentTisk or getChildTask
	virtual BYTE isSimple () = 0;	
	virtual DWORD getId () = 0;
	virtual void _m14 (DWORD _a0) { }
	virtual BYTE _m18 (CEntity *, int, void *) = 0;

	DWORD	_f4;

	void * operator new (size_t size);
	void operator delete (void * ptr);
};

class CSimpleTask : public CTaskBase {
public:

	CSimpleTask () : CTaskBase () {}
	virtual ~CSimpleTask () {}

	virtual CTaskBase * _m08 () { return NULL; }
	virtual BYTE isSimple () { return 1; }

	virtual BYTE _m1C (CEntity *) = 0;
	virtual BYTE _m20 () { return 0; }
};


class CTask_8708EC : public CSimpleTask {	// player idle
public:

	CTask_8708EC (); 
	virtual ~CTask_8708EC () {}

	virtual CTaskBase * clone () { return new CTask_8708EC (); }
	virtual DWORD getId () { return 0; }

	virtual BYTE _m18 (CEntity *, int, void *);
	virtual BYTE _m1C (CEntity *);

	int		ifpIndex;	// +08
	DWORD	_f0C;
	DWORD	_f10;
	DWORD	_f14;
	DWORD	_f18;
};

#pragma pack(pop)
