You don't have to worry about the command itself, the raw/cooked food item type goes in the cookassociation
Code:
internal class Cook : Command
{
public Cook() : base("cook"){}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length == 0)
{
player.SendHelp("Usage: /cook <Cookable-ItemName>");
return false;
}
string name = string.Join(" ", args.ToArray()).Trim();
ushort obj_1;
Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(player.Manager.GameData.IdToObjectType,
StringComparer.OrdinalIgnoreCase);
if (!icdatas.TryGetValue(name, out obj_1))
{
player.SendError("Unknown type!");
return false;
}
if (!CookAssociation.CheckForCampfire(player))
{
player.SendError("You must be standing on top of a campfire!");
return false;
}
if (player.Manager.GameData.Items[obj_1].Cookable)
{
ushort obj_2 = CookAssociation.ItemConversion(obj_1);
for (int g = 0; g < player.Inventory.Length; g++)