#pragma once

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

class NetCli_Magic : public CNetGlobal
{
protected:
    //-------------------------------------------------------------------
    static NetCli_Magic* This;
    static bool _Init();
    static bool _Release();
    //-------------------------------------------------------------------
    static void _PG_Magic_LtoC_BeginSpell         	( int Sockid , int Size , void* Data );
    static void _PG_Magic_LtoC_EndSpell           	( int Sockid , int Size , void* Data );
    static void _PG_Magic_LtoC_BeginSpellResult   	( int Sockid , int Size , void* Data );
    static void _PG_Magic_LtoC_MagicAttack        	( int Sockid , int Size , void* Data );
    static void _PG_Magic_LtoC_MagicAssistResult  	( int Sockid , int Size , void* Data );
    static void _PG_Magic_LtoC_FixAssistMagicTime 	( int Sockid , int Size , void* Data );
    static void _PG_Magic_LtoC_CancelSpellMagic   	( int Sockid , int Size , void* Data );
    static void _PG_Magic_LtoC_SetMagicPointResult	( int Sockid , int Size , void* Data );
	static void _PG_Magic_LtoC_AddBuffInfo			( int Sockid , int Size , void* Data );
	static void _PG_Magic_LtoC_DelBuffInfo			( int Sockid , int Size , void* Data );
	static void _PG_Magic_LtoC_ResetColdown			( int Sockid , int Size , void* Data );

	static void _PG_Magic_LtoC_BeginShoot			( int Sockid , int Size , void* Data );
	static void _PG_Magic_LtoC_SysBeginShoot		( int Sockid , int Size , void* Data );
	static void _PG_Magic_LtoC_SysEndShoot			( int Sockid , int Size , void* Data );
	static void _PG_Magic_LtoC_MagicShieldInfo		( int Sockid , int Size , void* Data );

public:    
    NetCli_Magic() { This = this; }

    static void BeginSpell			( int OwnerID , int TargetID , int MagicID , int MagicPos );
	static void BeginSpell_Pos		( int OwnerID , float X , float Y , float Z , int MagicID , int MagicPos );
    static void SetMagicPoint		( int MagicID , int MagicPos );
	static void CancelAssistMagic	( int MagicID );

    virtual void R_BeginSpell         ( int OwnerID , int TargetID , float X , float Y , float Z , int MagicID , int SerialID ) = 0;
    virtual void R_EndSpell           ( int SerailID ) = 0;
    virtual void R_BeginSpellOK       ( int MagicID , int SerialID , int SpellTime ) = 0;
    virtual void R_BeginSpellFailed   ( int MagicID , int SerialID ) = 0;
    virtual void R_MagicAttack        ( int MagicBaseID , int Serial , MagicAttackTypeENUM	AtkType , vector< MagicAtkEffectInfoStruct >& List ) = 0;
    virtual void R_MagicAssist        ( int MagicBaseID , int Serial , vector< MagicAssistEffectInfoStruct >& List ) = 0;

	virtual void R_ResetColdown		  ( ) = 0;
    virtual void R_FixAssistMagicTime ( int MagicID , int EffectTime ) = 0;
    virtual void R_CancelSpellMagic   ( int OwnerID , int SerialID ) = 0;
    virtual void R_SetMagicPointResult( int MagicID , int MagicPos , bool Result , int ErrorCode ) = 0;

	virtual void R_AddBuffInfo( int OwnerID , int MagicID , int EffectTime ) = 0;
	virtual void R_DelBuffInfo( int OwnerID , int MagicID ) = 0;

	virtual void R_BeginShoot	( int SerialID ) = 0;
	virtual void R_SysBeginShoot( int OwnerID , int TargetID , int MagicColID , int SerialID ) = 0;
	virtual void R_SysEndShoot	( int SerialID ) = 0;

	virtual void R_MagicShieldInfo( int AttackGUID , int UnAttackGUID , int AttackMagicID , int ShieldMagicID , int AbsobDamage ) = 0;


};

