org.dom4j.Element targetElement = targetIterator.next();
int itemId = Integer.parseInt(targetElement.attributeValue("item_id", "57"));
long price = Integer.parseInt(targetElement.attributeValue("price"));
int npcStringId = Integer.parseInt(targetElement.attributeValue("name"));
int castleId = Integer.parseInt(targetElement.attributeValue("castle_id", "0"));
TeleportLocation loc = new TeleportLocation(itemId, price, npcStringId, castleId);
loc.set(Location.parseLoc(targetElement.attributeValue("loc")));
list.add(loc);
}
template.addTeleportList(id, list.toArray(new TeleportLocation[list.size()]));
}
}