diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs index 8d862ae804..5a40aa0491 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs @@ -302,6 +302,16 @@ namespace CSNetwork.C2SCommand public byte pvpMask; } + // Gather material command + public struct cmd_gather_material + { + public int mid; // Matter ID + public ushort tool_pack; // Tool package + public ushort tool_index; // Tool index + public int tool_type; // Tool type ID + public int id_task; // Task ID + } + public struct cmd_error_msg { public int iMessage; diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs index ff424e5a88..f7b832c87c 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs @@ -743,5 +743,18 @@ namespace CSNetwork.C2SCommand // Serialize the command and return the serialized data return SerializeCommand(CommandID.AUTO_TEAM_SET_GOAL, pCmd); } + + public static Octets c2s_CmdGatherMaterial(int idMatter, int iToolPack, int iToolIdx, int idTool, int idTask) + { + var cmd = new cmd_gather_material + { + mid = idMatter, + tool_pack = (ushort)iToolPack, + tool_index = (ushort)iToolIdx, + tool_type = idTool, + id_task = idTask + }; + return SerializeCommand(CommandID.GATHER_MATERIAL, cmd); + } } }