#pragma once

#include "NetCli_Trade.h"

#define PLAYER_TRADE_MAX_ITEM				8

class NetCli_TradeChild : public NetCli_Trade
{
public:	
	static	bool _Init();
	static	bool _Release();

public:
	NetCli_TradeChild();

	static	void				ClearItem();
	static	ItemFieldStruct*	GetTradeItem(int index);
	static	int					GetMoney()						{ return s_money; }	

	virtual void R_RequestTrade          ( int TargetID );
	virtual void R_OpenTrade             ( char* Name , int TargetID );
	virtual void R_TargetPutItem         ( int Pos , ItemFieldStruct& Item );
	virtual void R_TargetPutMoney        ( int Money );
	virtual void R_OwnerPutMoney         ( int Money );
	virtual void R_TargetItemOK          ( );
	virtual void R_CancelItemOK          ( );
	virtual void R_FinalOKEnable         ( );
	virtual void R_TargetFinalOK         ( );
	virtual void R_ClearTradeItem        ( );
	virtual void R_TradeItem_OK          ( );
	virtual void R_TradeItem_Failed      ( );
	virtual void R_PutItem_OK            ( );
	virtual void R_PutItem_Failed        ( );
	virtual void R_RequestTradeError     ( );
	virtual void R_DisagreeTrade         ( );	

protected:
	static	ItemFieldStruct		s_tradeItem[PLAYER_TRADE_MAX_ITEM];
	static	int					s_money;
};

