#include "NetCli_EQ.h"
#include "../../MainProc/NetGlobal.h"
//-------------------------------------------------------------------
NetCli_EQ*    NetCli_EQ::This         = NULL;

//-------------------------------------------------------------------
bool NetCli_EQ::_Init()
{
    //_Net.RegOnSrvPacketFunction	( EM_PG_EQ_LtoC_SetEQResult  , _PG_EQ_LtoC_SetEQResult );
    Cli_NetReg( PG_EQ_LtoC_SetEQResult );
    return true;
}
//-------------------------------------------------------------------
bool NetCli_EQ::_Release()
{
    return true;
}
//-------------------------------------------------------------------
void NetCli_EQ::_PG_EQ_LtoC_SetEQResult ( int Sockid , int Size , void* Data )
{
    PG_EQ_LtoC_SetEQResult*  PG = (PG_EQ_LtoC_SetEQResult*)Data;
    switch( PG->Result )
    {
    case ENMU_EQ_SetEqOK:
        This->R_SetEQOK(  );
        break;
    case ENMU_EQ_SetEqFailed:
        This->R_SetEQFailed( );
        break;
    }    
}
//-------------------------------------------------------------------
void NetCli_EQ::S_SetEQ_Body( ItemFieldStruct& Item , int ItemPos , int EqPos )
{
    PG_EQ_CtoL_SetEQ Send;
    Send.Item = Item;
    Send.ItemPos = ItemPos;
    Send.EqPos = (EQWearPosENUM)EqPos;
    Send.PosType = Def_Item_Pos_Body;

    SendToLocal( sizeof(Send) , &Send );
}

void NetCli_EQ::S_SetEQ_Bank( ItemFieldStruct& Item , int ItemPos , int EqPos )
{
    PG_EQ_CtoL_SetEQ Send;
    Send.Item = Item;
    Send.ItemPos = ItemPos;
    Send.EqPos = (EQWearPosENUM)EqPos;
    Send.PosType = Def_Item_Pos_Bank;

    SendToLocal( sizeof(Send) , &Send );
}
//-------------------------------------------------------------------
void NetCli_EQ::S_SetEQ_EQ( ItemFieldStruct& Item , int ItemPos , int EqPos )
{
    PG_EQ_CtoL_SetEQ Send;
    Send.Item = Item;
    Send.ItemPos = ItemPos;
    Send.EqPos = (EQWearPosENUM)EqPos;
    Send.PosType = Def_Item_Pos_EQ;

    SendToLocal( sizeof(Send) , &Send );
}
//-------------------------------------------------------------------