writeH(ent.getProduction().size());
writeH(ingredients.size());
for (MultiSellIngredient prod : ent.getProduction())
{
int itemId = prod.getItemId();
ItemTemplate template = itemId > 0 ? ItemHolder.getInstance().getTemplate(prod.getItemId()) : null;
writeD(itemId);
writeD(itemId > 0 ? template.getBodyPart() : 0);
writeH(itemId > 0 ? template.getType2ForPackets() : 0);
writeQ(prod.getItemCount());
writeH(prod.getItemEnchant());
writeD(prod.getChance());
writeD(0x00);
writeD(0x00);
writeItemElements(prod);
}
for (MultiSellIngredient i : ingredients)
{
int itemId = i.getItemId();
final ItemTemplate item = itemId > 0 ? ItemHolder.getInstance().getTemplate(i.getItemId()) : null;
writeD(itemId);
writeH(itemId > 0 ? item.getType2() : 0xffff);
writeQ(i.getItemCount());
writeH(i.getItemEnchant());
writeD(0x00);
writeD(0x00);
writeItemElements(i);