{
if (NODE_INGRIDIENT.equalsIgnoreCase(d.getNodeName()))
{
int id = Integer.parseInt(d.getAttributes().getNamedItem("id").getNodeValue());
long count = Long.parseLong(d.getAttributes().getNamedItem("count").getNodeValue());
MultiSellIngredient mi = new MultiSellIngredient(id, count);
if (d.getAttributes().getNamedItem("enchant") != null)
{
mi.setItemEnchant(Integer.parseInt(d.getAttributes().getNamedItem("enchant").getNodeValue()));
}
if (d.getAttributes().getNamedItem("mantainIngredient") != null)
{
mi.setMantainIngredient(Boolean.parseBoolean(d.getAttributes().getNamedItem("mantainIngredient").getNodeValue()));
}
if (d.getAttributes().getNamedItem("fireAttr") != null)
{
mi.getItemAttributes().setFire(Integer.parseInt(d.getAttributes().getNamedItem("fireAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("waterAttr") != null)
{
mi.getItemAttributes().setWater(Integer.parseInt(d.getAttributes().getNamedItem("waterAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("earthAttr") != null)
{
mi.getItemAttributes().setEarth(Integer.parseInt(d.getAttributes().getNamedItem("earthAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("windAttr") != null)
{
mi.getItemAttributes().setWind(Integer.parseInt(d.getAttributes().getNamedItem("windAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("holyAttr") != null)
{
mi.getItemAttributes().setHoly(Integer.parseInt(d.getAttributes().getNamedItem("holyAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("unholyAttr") != null)
{
mi.getItemAttributes().setUnholy(Integer.parseInt(d.getAttributes().getNamedItem("unholyAttr").getNodeValue()));
}
entry.addIngredient(mi);
}
else if (NODE_PRODUCTION.equalsIgnoreCase(d.getNodeName()))
{
int id = Integer.parseInt(d.getAttributes().getNamedItem("id").getNodeValue());
long count = Long.parseLong(d.getAttributes().getNamedItem("count").getNodeValue());
MultiSellIngredient mi = new MultiSellIngredient(id, count);
if (d.getAttributes().getNamedItem("enchant") != null)
{
mi.setItemEnchant(Integer.parseInt(d.getAttributes().getNamedItem("enchant").getNodeValue()));
}
if (d.getAttributes().getNamedItem("chance") != null)
{
mi.setChance(Integer.parseInt(d.getAttributes().getNamedItem("chance").getNodeValue()));
}
if (d.getAttributes().getNamedItem("fireAttr") != null)
{
mi.getItemAttributes().setFire(Integer.parseInt(d.getAttributes().getNamedItem("fireAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("waterAttr") != null)
{
mi.getItemAttributes().setWater(Integer.parseInt(d.getAttributes().getNamedItem("waterAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("earthAttr") != null)
{
mi.getItemAttributes().setEarth(Integer.parseInt(d.getAttributes().getNamedItem("earthAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("windAttr") != null)
{
mi.getItemAttributes().setWind(Integer.parseInt(d.getAttributes().getNamedItem("windAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("holyAttr") != null)
{
mi.getItemAttributes().setHoly(Integer.parseInt(d.getAttributes().getNamedItem("holyAttr").getNodeValue()));
}
if (d.getAttributes().getNamedItem("unholyAttr") != null)
{
mi.getItemAttributes().setUnholy(Integer.parseInt(d.getAttributes().getNamedItem("unholyAttr").getNodeValue()));
}
if (!Config.ALT_ALLOW_SHADOW_WEAPONS && (id > 0))
{
ItemTemplate item = ItemHolder.getInstance().getTemplate(id);
if ((item != null) && item.isShadowItem() && item.isWeapon() && !Config.ALT_ALLOW_SHADOW_WEAPONS)