#pragma once

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

class NetCli_Item : public CNetGlobal
{
protected:
    //-------------------------------------------------------------------
    static NetCli_Item* This;
    static bool _Init();
    static bool _Release();
    //-------------------------------------------------------------------
    static void _PG_Item_LtoC_GetItemResult            ( int Sockid , int Size , void* Data );   
    static void _PG_Item_LtoC_ClsItemInBuffer          ( int Sockid , int Size , void* Data );   
    static void _PG_Item_LtoC_NewItemInBuffer          ( int Sockid , int Size , void* Data );   
    static void _PG_Item_LtoC_DeleteItem               ( int Sockid , int Size , void* Data );   
    static void _PG_Item_LtoC_ExchangeField            ( int Sockid , int Size , void* Data );   
    static void _PG_Item_LtoC_BodyBankMoneyExchange    ( int Sockid , int Size , void* Data );   
    static void _PG_Item_LtoC_FixItemInfo              ( int Sockid , int Size , void* Data );    
    static void _PG_Item_LtoC_FixAllItemInfo           ( int Sockid , int Size , void* Data );   
    static void _PG_Item_LtoC_FixMoney                 ( int Sockid , int Size , void* Data );    
    static void _PG_Item_LtoC_MaxItemCount             ( int Sockid , int Size , void* Data );   
    static void _PG_Item_LtoC_OpenBank                 ( int Sockid , int Size , void* Data );    
    static void _PG_Item_LtoC_CloseBank                ( int Sockid , int Size , void* Data );    
    static void _PG_Item_LtoC_UseItemResult            ( int Sockid , int Size , void* Data );    
	static void _PG_Item_LtoC_SetKeyItemFlag           ( int Sockid , int Size , void* Data );    

public:    
    NetCli_Item() { This = this; }


    static void _GetGroundItem                  ( int ItemID , int Pos );             
    static void _GetBufferItem                  ( ItemFieldStruct Item , int Pos , int Count );
    static void _DelBufferItem                  ( ItemFieldStruct Item );
    static void _DeleteItem_Body                ( ItemFieldStruct Item , int Pos );
    static void _DeleteItem_Bank                ( ItemFieldStruct Item , int Pos );
    static void _DeleteItem_EQ                  ( ItemFieldStruct Item , int Pos );

    static void _ExchangeField_Body             ( ItemFieldStruct Item1 , int Pos1 , ItemFieldStruct Item2 , int Pos2 );
    static void _ExchangeField_Bank             ( ItemFieldStruct Item1 , int Pos1 , ItemFieldStruct Item2 , int Pos2 );
    static void _ExchangeField_BankBody         ( ItemFieldStruct Item1 , int Pos1 , ItemFieldStruct Item2 , int Pos2 );
    static void _ExchangeField_BodyBank         ( ItemFieldStruct Item1 , int Pos1 , ItemFieldStruct Item2 , int Pos2 );

    static void _RequestBodyBankMoneyExchange   ( int Count );
    static void _RequestBufferInfo              ( );
    static void _RequestApartBodyItem           ( ItemFieldStruct Item , int SrcPos , int DesCount , int DesPos);
    static void _RequestFixAllItemInfo          ( );
    static void _CloseBank                      ();
    static void _UseItem_Body                   ( ItemFieldStruct Item , int Pos , int TargetID , float TargetX = 0 , float TargetY = 0 , float TargetZ = 0 );
    static void _UseItem_Bank                   ( ItemFieldStruct Item , int Pos , int TargetID , float TargetX = 0 , float TargetY = 0 , float TargetZ = 0 );
    static void _UseItem_EQ						( ItemFieldStruct Item , int Pos , int TargetID , float TargetX = 0 , float TargetY = 0 , float TargetZ = 0 );



    virtual void R_GetItemOK                ( ) = 0;   
    virtual void R_GetGroundItemFailed      ( ) = 0;
    virtual void R_GetBufferItemFailed      ( ) = 0;
	virtual void R_GetBufferItemOK			( int Count ) = 0;


    virtual void R_ClsItemInBuffer          ( ) = 0;   
    virtual void R_NewItemInBuffer          ( ItemFieldStruct& Item ) = 0;   

    virtual void R_DeleteItemOK_Body        ( ) = 0;   
    virtual void R_DeleteItemOK_Bank        ( ) = 0;  
    virtual void R_DeleteItemOK_EQ          ( ) = 0;   
    virtual void R_DeleteItemFailed         ( ) = 0;   

    
    virtual void R_ExchangeFieldOK_Body          ( ) = 0;   
    virtual void R_ExchangeFieldOK_Bank          ( ) = 0;   
    virtual void R_ExchangeFieldOK_BodyBank      ( ) = 0;   
    virtual void R_ExchangeFieldFailed_Body      ( ) = 0;   
    virtual void R_ExchangeFieldFailed_Bank      ( ) = 0;   
    virtual void R_ExchangeFieldFailed_BodyBank  ( ) = 0;   


    virtual void R_BodyBankMoneyExchangeOK    ( ) = 0;   
    virtual void R_BodyBankMoneyExchangeFalse ( ) = 0;   
    virtual void R_FixItemInfo_Body           ( ItemFieldStruct& Item , int Pos ) = 0;    
    virtual void R_FixItemInfo_Bank           ( ItemFieldStruct& Item , int Pos ) = 0;    
    virtual void R_FixItemInfo_EQ             ( ItemFieldStruct& Item , int Pos ) = 0;    

    virtual void R_FixAllItemInfo           ( ItemStruct& Body , ItemStruct& Bank , EQStruct& EQ ) = 0;   
    virtual void R_FixMoney                 ( int BodyMoney , int BankMoney ) = 0;    
    virtual void R_MaxItemCount             ( int MaxBodyItem , int MaxBankItem ) = 0;   
    virtual void R_OpenBank                 ( int GItemID ) = 0;    
    virtual void R_CloseBank                ( ) = 0;    
    virtual void R_UseItemOK                ( int Pos ) = 0;    
    virtual void R_UseItemFailed            ( int Pos ) = 0;    

	virtual void R_SetKeyItemFlag			( int KeyItemID , bool Value ) = 0;
};

