for (Iterator<org.dom4j.Element> nextIterator = subElement.elementIterator(); nextIterator.hasNext();)
{
org.dom4j.Element nextElement = nextIterator.next();
int id = Integer.parseInt(nextElement.attributeValue("id"));
int level = Integer.parseInt(nextElement.attributeValue("level"));
Skill skill = SkillTable.getInstance().getInfo(id, level);
if (skill != null)
{
template.attachSkill(skill);
}
else
{
info("Skill not found(" + id + "," + level + ") for item:" + set.getObject("item_id") + "; file:" + getCurrentFileName());
}
}
}
else if (subName.equalsIgnoreCase("enchant4_skill"))
{
int id = Integer.parseInt(subElement.attributeValue("id"));
int level = Integer.parseInt(subElement.attributeValue("level"));
Skill skill = SkillTable.getInstance().getInfo(id, level);
if (skill != null)
{
template.setEnchant4Skill(skill);
}
}
else if (subName.equalsIgnoreCase("unequip_skill"))
{
int id = Integer.parseInt(subElement.attributeValue("id"));
int level = Integer.parseInt(subElement.attributeValue("level"));
Skill skill = SkillTable.getInstance().getInfo(id, level);
if (skill != null)
{
template.setUnequipeSkill(skill);
}
}