#pragma once

#include "PG_Shop.h"
#include "../../MainProc/NetGlobal.h"

class NetCli_Shop : public CNetGlobal
{
protected:
    //-------------------------------------------------------------------
    static NetCli_Shop* This;
    static bool _Init();
    static bool _Release();
    //-------------------------------------------------------------------

    static void _PG_Shop_LtoC_ShopOpen            ( int Sockid , int Size , void* Data ); 
    static void _PG_Shop_LtoC_ShopClose           ( int Sockid , int Size , void* Data );
    static void _PG_Shop_LtoC_BuyItemResult       ( int Sockid , int Size , void* Data );
    static void _PG_Shop_LtoC_SelectSellItemResult( int Sockid , int Size , void* Data );
    static void _PG_Shop_LtoC_RepairWeaponResult  ( int Sockid , int Size , void* Data );

	static void _PG_Shop_LtoC_AddSellItemRecord	  ( int Sockid , int Size , void* Data );
	static void _PG_Shop_LtoC_DelSellItemRecord	  ( int Sockid , int Size , void* Data );
	static void _PG_Shop_LtoC_FixShopItemCount	  ( int Sockid , int Size , void* Data );
public:    
    NetCli_Shop() { This = this; }

    static void S_ShopCloseNotify        ( );
    static void S_BuyItemRequest         (  int OrgObjID , int Count  );
    static void S_SelectSellItemRequest  (  int FieldID , ItemFieldStruct* SellItem );
    static void S_RepairWeaponRequest    (  int Pos , bool IsWeapon );

	//¶R¦^ª««~
	static void S_BuySellItemRecord     ( SellItemFieldStruct& Info );


    virtual void R_ShopOpen            	( int TraderID , int ShopObjID , int ItemCount[30] ) = 0;  
    virtual void R_ShopClose           	( int TraderID ) = 0;
    virtual void R_BuyItemResult       	( int TraderID , int OrgObjID , int Count , bool Result ) = 0;
    virtual void R_SelectSellItemResult	( int TraderID , int FieldID , bool Result ) = 0;    
    virtual void R_RepairWeaponResult  	( int TraderID , int Pos , bool IsWeapon , bool Result ) = 0;

	virtual void R_AddSellItemRecord	( SellItemFieldStruct& Info ) = 0;
	virtual void R_DelSellItemRecord	( int EarsePos ) = 0;
	virtual void R_FixShopItemCount		( int TraderID , int ShopObjID , int Pos , int ItemCount ) = 0;


};

