NamedNodeMap attrs = d.getAttributes();
int id = Integer.parseInt(attrs.getNamedItem("id").getNodeValue());
int skillId = Integer.parseInt(attrs.getNamedItem("skillId").getNodeValue());
String name = attrs.getNamedItem("name").getNodeValue();
CursedWeapon cw = new CursedWeapon(id, skillId, name);
name = null;
int val;
for(Node cd = d.getFirstChild(); cd != null; cd = cd.getNextSibling())
{
if("dropRate".equalsIgnoreCase(cd.getNodeName()))
{
attrs = cd.getAttributes();
val = Integer.parseInt(attrs.getNamedItem("val").getNodeValue());
cw.setDropRate(val);
}
else if("duration".equalsIgnoreCase(cd.getNodeName()))
{
attrs = cd.getAttributes();
val = Integer.parseInt(attrs.getNamedItem("val").getNodeValue());
cw.setDuration(val);
}
else if("durationLost".equalsIgnoreCase(cd.getNodeName()))
{
attrs = cd.getAttributes();
val = Integer.parseInt(attrs.getNamedItem("val").getNodeValue());
cw.setDurationLost(val);
}
else if("disapearChance".equalsIgnoreCase(cd.getNodeName()))
{
attrs = cd.getAttributes();
val = Integer.parseInt(attrs.getNamedItem("val").getNodeValue());
cw.setDisapearChance(val);
}
else if("stageKills".equalsIgnoreCase(cd.getNodeName()))
{
attrs = cd.getAttributes();
val = Integer.parseInt(attrs.getNamedItem("val").getNodeValue());
cw.setStageKills(val);
}
}
// Store cursed weapon
_cursedWeapons.put(id, cw);