#ifndef __PG_MOVE_H__
#define __PG_MOVE_H__
#pragma warning (disable:4949)
#include "../../RoleData/RoleBaseDef.h"
#include "..\NetWakerPGEnum.h"
#pragma unmanaged
//-----------------------------------------------------------------------------------------
// Local -> Client
// 通知Client物件產生
struct PG_Move_LtoC_AddToPartition
{ 
    GamePGCommandEnum	Command;
    UInt32				GItemID;			//物件號碼 (要求移動的物件)
//    UInt32				WorldGUID;
    UInt32				LGItemID;           //上個區域的ID

    PlayerGraphStruct	GraphObj;			//顯像資料
    RolePosStruct       Pos;
	int					DBID;

    PG_Move_LtoC_AddToPartition()
    { Command = EM_PG_Move_LtoC_AddToPartition; }
};
//-----------------------------------------------------------------------------------------
// Local -> Client
// 通知Client物件消失
struct PG_Move_LtoC_DelFromPartition
{
    GamePGCommandEnum	Command;
    UInt32				GItemID;				//物件號碼 (要求移動的物件)
//    UInt32				WorldGUID;

    PG_Move_LtoC_DelFromPartition()
    { Command = EM_PG_Move_LtoC_DelFromPartition; }
};
//-----------------------------------------------------------------------------------------
struct LookEQInfoStruct
{
   union
   {
       int EQ[ 10 ];
       struct
       {
           int Head;        
           int Gloves;	   
           int Shoes;	
           int Clothes;	   
           int Pants;	
           int Back;		   
           int Belt;		   
           int Shoulder;	   
           int MainHand;	   
           int SecondHand;  
       };
   };
};

//Local -> Client
struct PG_Move_LtoC_EQInfo
{
    GamePGCommandEnum	Command;
    int                 ItemID;
    LookEQInfoStruct    EQLook;
    
    PG_Move_LtoC_EQInfo()
    { Command = EM_PG_Move_LtoC_EQInfo; }
};
//-----------------------------------------------------------------------------------------
struct PG_Move_LtoC_FixEQInfo
{
    GamePGCommandEnum	Command;
    int                 ItemID;
    EQWearPosENUM       Pos;
    int                 EQ;

    PG_Move_LtoC_FixEQInfo()
    { Command = EM_PG_Move_LtoC_FixEQInfo; }
};
//-----------------------------------------------------------------------------------------
// Local -> Client
// 通知Client物件重新定位
struct PG_Move_LtoC_SetPostion
{
    GamePGCommandEnum	Command;
    UInt32				GItemID;				//物件號碼 (要求移動的物件)
//    UInt32				WorldGUID;
    RolePosStruct       Pos;
//    float				X , Y , Z , Dir;

    PG_Move_LtoC_SetPostion()
    { Command = EM_PG_Move_LtoC_SetPostion; }
};
//-----------------------------------------------------------------------------------------
// Local -> Client
// 通知Client物件移動
struct PG_Move_LtoC_ObjectMove
{
    GamePGCommandEnum	Command;
    UInt32				GItemID;				//物件號碼 (要求移動的物件)
//    UInt32				WorldGUID;
    RolePosStruct       Pos;
	float               vX;
	float               vZ;
	ClientMoveTypeENUM  Type;					//

    PG_Move_LtoC_ObjectMove()
    { Command = EM_PG_Move_LtoC_ObjectMove; }
};
//-----------------------------------------------------------------------------------------
// Client -> Local 
// 玩家控制物件移動的資訊
struct PG_Move_CtoL_PlayerMoveObject
{
    GamePGCommandEnum	Command;
    UInt32				GItemID;				//物件號碼 (要求移動的物件)    
    RolePosStruct       Pos;
    ClientMoveTypeENUM  Type;					//
	float               vX;
	float               vZ;			
//    float				X , Y , Z , Dir;

    PG_Move_CtoL_PlayerMoveObject()
    { Command = EM_PG_Move_CtoL_PlayerMoveObject; }
};

//-----------------------------------------------------------------------------------------
// Local -> Client
//通知 Client 做動作
struct PG_Move_LtoC_DoAction
{
    GamePGCommandEnum	Command;
    Int32				GItemID;				//物件號碼 (要求做動作的物件)
    Int32				ActionID;
    Int32               TempActionID;

    PG_Move_LtoC_DoAction()
    { Command = EM_PG_Move_LtoC_DoAction; }
};
//-----------------------------------------------------------------------------------------
// Client -> Server
//通知 Server 轉發做動作
struct PG_Move_CtoL_DoAction
{
    GamePGCommandEnum	Command;
    Int32				GItemID;				//物件號碼 (要求做動作的物件)
    Int32				ActionID;
    Int32               TempActionID;              //是否暫時動做

    PG_Move_CtoL_DoAction()
    { Command = EM_PG_Move_CtoL_DoAction; }
};
//-----------------------------------------------------------------------------------------
// Local -> Client
//設定移動速度
struct PG_Move_LtoC_MoveSpeed
{
    GamePGCommandEnum	Command;
    Int32				GItemID;				//物件號碼 (要求做動作的物件)
//    UInt32				WorldGUID;
    float				Speed;

    PG_Move_LtoC_MoveSpeed()
    { Command = EM_PG_Move_LtoC_MoveSpeed; }
};

//-----------------------------------------------------------------------------------------
// Local -> Client 
// 放大倍率
struct PG_Move_LtoC_ModelRate
{
    GamePGCommandEnum	Command;
    Int32				GItemID;				//物件號碼 (要求做動作的物件)
//    UInt32				WorldGUID;
    float				ModelRate;

    PG_Move_LtoC_ModelRate()
    { Command = EM_PG_Move_LtoC_ModelRate; }
};
//-----------------------------------------------------------------------------------------
// Local -> Client
//通知兩者互相的關係
enum RoleRelationENUM
{
    EM_RoleRelation_CanAttack       ,
    EM_RoleRelation_CanNotAttack    ,
};
struct PG_Move_LtoC_Relation
{
    GamePGCommandEnum	Command;
    Int32				GItemID;				//物件號碼 (要求做動作的物件)
    RoleRelationENUM    Relation;

    PG_Move_LtoC_Relation()
    { Command = EM_PG_Move_LtoC_Relation; }
};
//-----------------------------------------------------------------------------------------
//角色容貌微調
struct PG_Move_LtoC_LookFace
{
    GamePGCommandEnum	Command;
    int                 GItemID;
    LookStruct          Look;

    PG_Move_LtoC_LookFace()
    { Command = EM_PG_Move_LtoC_LookFace; }
};
//-----------------------------------------------------------------------------------------
struct PG_Move_LtoC_ClientAutoPlot
{
    GamePGCommandEnum	Command;

    int		                                    GItemID;				//物件的區域
    StaticString< _MAX_LUA_FUNTIONNAMESIZE_ >   AutoPlot;

    PG_Move_LtoC_ClientAutoPlot()
    {
        Command = EM_PG_Move_LtoC_ClientAutoPlot;
    }
};
//-----------------------------------------------------------------------------------------
struct PG_Move_LtoC_ActionType
{
    GamePGCommandEnum	Command;
    int                 GItemID;
    RoleActionStruct	Action;			                //目前的行動狀態

    PG_Move_LtoC_ActionType()
    {
        Command = EM_PG_Move_LtoC_ActionType;
    }
};
//-----------------------------------------------------------------------------------------
//Client 通知 Server要做跳越
struct PG_Move_CtoL_JumpBegin
{
    GamePGCommandEnum	Command;
    int                 GItemID;
    float               X;
    float               Y;
    float               Z;
    float               Dir;

    float               vX;
    float               vY;
    float               vZ;


    PG_Move_CtoL_JumpBegin()
    {
        Command = EM_PG_Move_CtoL_JumpBegin;
    }
};
//-----------------------------------------------------------------------------------------
//Server 通知 周圍玩家某角色要做跳越
struct PG_Move_LtoC_JumpBegin
{
    GamePGCommandEnum	Command;
    int                 GItemID;
    float               X;
    float               Y;
    float               Z;
    float               Dir;

    float               vX;
    float               vY;
    float               vZ;


    PG_Move_LtoC_JumpBegin()
    {
        Command = EM_PG_Move_LtoC_JumpBegin;
    }
};
//-----------------------------------------------------------------------------------------
//Client 通知 Server跳越結束
struct PG_Move_CtoL_JumpEnd
{
    GamePGCommandEnum	Command;
    int                 GItemID;
    float               X;
    float               Y;
    float               Z;
    float               Dir;


    PG_Move_CtoL_JumpEnd()
    {
        Command = EM_PG_Move_CtoL_JumpEnd;
    }
};
//-----------------------------------------------------------------------------------------
//Server 通知 Client跳越結束
struct PG_Move_LtoC_JumpEnd
{
    GamePGCommandEnum	Command;
    int                 GItemID;
    float               X;
    float               Y;
    float               Z;
    float               Dir;


    PG_Move_LtoC_JumpEnd()
    {
        Command = EM_PG_Move_LtoC_JumpEnd;
    }
};
//-----------------------------------------------------------------------------------------
struct PG_Move_LtoC_PartyMemberMove
{
	GamePGCommandEnum	Command;
	int					DBID;
	int					ZoneID;
	float               X;
	float               Y;
	float               Z;
	
	PG_Move_LtoC_PartyMemberMove()
	{
		Command = EM_PG_Move_LtoC_PartyMemberMove;
	}
};
//-----------------------------------------------------------------------------------------
struct PG_Move_LtoC_PlayMotion
{
	PACKET_CONSTRUCT( PG_Move_LtoC_PlayMotion );

	int						iObjID;
	//int						iMotionID;
	char					szMotion[64];
};
//-----------------------------------------------------------------------------------------
#pragma managed
#endif //__PG_MOVE_H__