Add c2s_CmdGatherMaterial and struct cmd_gather_material

This commit is contained in:
HungDK
2025-12-22 17:53:48 +07:00
parent cb4e27c2b9
commit a4e9e85bed
2 changed files with 23 additions and 0 deletions
@@ -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;
@@ -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);
}
}
}